mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-19 17:35:42 +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:
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user