mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-23 15:30:03 +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:
@@ -35,6 +35,10 @@ impl<'a> flatbuffers::Follow<'a> for TableInFirstNS<'a> {
|
||||
}
|
||||
|
||||
impl<'a> TableInFirstNS<'a> {
|
||||
pub const fn get_fully_qualified_name() -> &'static str {
|
||||
"NamespaceA.TableInFirstNS"
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
|
||||
TableInFirstNS {
|
||||
@@ -133,6 +137,10 @@ impl<'a> flatbuffers::Follow<'a> for SecondTableInA<'a> {
|
||||
}
|
||||
|
||||
impl<'a> SecondTableInA<'a> {
|
||||
pub const fn get_fully_qualified_name() -> &'static str {
|
||||
"NamespaceA.SecondTableInA"
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
|
||||
SecondTableInA {
|
||||
@@ -219,6 +227,10 @@ impl<'a> flatbuffers::Follow<'a> for TableInC<'a> {
|
||||
}
|
||||
|
||||
impl<'a> TableInC<'a> {
|
||||
pub const fn get_fully_qualified_name() -> &'static str {
|
||||
"NamespaceC.TableInC"
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
|
||||
TableInC {
|
||||
|
||||
Reference in New Issue
Block a user