[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:
Anass Al
2020-09-17 12:19:07 -07:00
committed by GitHub
parent f96d1ef744
commit b8e87fafe4
16 changed files with 213 additions and 8 deletions

View File

@@ -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