mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-25 04:26:11 +00:00
[JS] Add getFullyQualifiedName() (#6119)
This optionally generates a static `getFullyQualifiedName()` function to get the fully-qualified name of a type in JavaScript and TypeScript in a similar fashion to the C++ codegen.
This commit is contained in:
@@ -72,6 +72,13 @@ mutate_foo(value:number):boolean {
|
||||
return true;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns string
|
||||
*/
|
||||
static getFullyQualifiedName():string {
|
||||
return 'NamespaceA.NamespaceB.TableInNestedNS';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param flatbuffers.Builder builder
|
||||
*/
|
||||
@@ -190,6 +197,13 @@ mutate_b(value:number):boolean {
|
||||
return true;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns string
|
||||
*/
|
||||
static getFullyQualifiedName():string {
|
||||
return 'NamespaceA.NamespaceB.StructInNestedNS';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param flatbuffers.Builder builder
|
||||
* @param number a
|
||||
|
||||
Reference in New Issue
Block a user