mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-16 09:12:22 +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:
@@ -94,6 +94,13 @@ Attacker.prototype.mutate_sword_attack_damage = function(value) {
|
||||
return true;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns {string}
|
||||
*/
|
||||
Attacker.getFullyQualifiedName = function() {
|
||||
return 'Attacker';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
*/
|
||||
@@ -171,6 +178,13 @@ Rapunzel.prototype.mutate_hair_length = function(value) {
|
||||
return true;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns {string}
|
||||
*/
|
||||
Rapunzel.getFullyQualifiedName = function() {
|
||||
return 'Rapunzel';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
* @param {number} hair_length
|
||||
@@ -224,6 +238,13 @@ BookReader.prototype.mutate_books_read = function(value) {
|
||||
return true;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns {string}
|
||||
*/
|
||||
BookReader.getFullyQualifiedName = function() {
|
||||
return 'BookReader';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
* @param {number} books_read
|
||||
@@ -348,6 +369,13 @@ Movie.prototype.charactersLength = function() {
|
||||
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns {string}
|
||||
*/
|
||||
Movie.getFullyQualifiedName = function() {
|
||||
return 'Movie';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user