[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

@@ -107,6 +107,13 @@ mutate_sword_attack_damage(value:number):boolean {
return true;
};
/**
* @returns string
*/
static getFullyQualifiedName():string {
return 'Attacker';
}
/**
* @param flatbuffers.Builder builder
*/
@@ -207,6 +214,13 @@ mutate_hair_length(value:number):boolean {
return true;
};
/**
* @returns string
*/
static getFullyQualifiedName():string {
return 'Rapunzel';
}
/**
* @param flatbuffers.Builder builder
* @param number hair_length
@@ -289,6 +303,13 @@ mutate_books_read(value:number):boolean {
return true;
};
/**
* @returns string
*/
static getFullyQualifiedName():string {
return 'BookReader';
}
/**
* @param flatbuffers.Builder builder
* @param number books_read
@@ -442,6 +463,13 @@ charactersLength():number {
return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
};
/**
* @returns string
*/
static getFullyQualifiedName():string {
return 'Movie';
}
/**
* @param flatbuffers.Builder builder
*/