mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-25 14:48:40 +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:
@@ -141,6 +141,10 @@ impl StructInNestedNS {
|
||||
|
||||
}
|
||||
}
|
||||
pub const fn get_fully_qualified_name() -> &'static str {
|
||||
"NamespaceA.NamespaceB.StructInNestedNS"
|
||||
}
|
||||
|
||||
pub fn a(&self) -> i32 {
|
||||
self.a_.from_little_endian()
|
||||
}
|
||||
@@ -165,6 +169,10 @@ impl<'a> flatbuffers::Follow<'a> for TableInNestedNS<'a> {
|
||||
}
|
||||
|
||||
impl<'a> TableInNestedNS<'a> {
|
||||
pub const fn get_fully_qualified_name() -> &'static str {
|
||||
"NamespaceA.NamespaceB.TableInNestedNS"
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
|
||||
TableInNestedNS {
|
||||
|
||||
Reference in New Issue
Block a user