mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-19 22:55:43 +00:00
Wrap types in namespace for --ts-flat-files and --gen-all (#7451)
* Wrap types in namespace for --ts-flat-files and --gen-all * Fixes for escaping object types * Added to generate_code
This commit is contained in:
14
tests/flatc/bar/bar_with_ns.fbs
Normal file
14
tests/flatc/bar/bar_with_ns.fbs
Normal file
@@ -0,0 +1,14 @@
|
||||
include "baz/baz_with_ns.fbs";
|
||||
include "baz/baz.fbs";
|
||||
|
||||
namespace bar;
|
||||
|
||||
table Bar {
|
||||
baz:baz.Baz;
|
||||
baz2:Baz;
|
||||
foo:Foo;
|
||||
}
|
||||
|
||||
table Foo {
|
||||
a:int;
|
||||
}
|
||||
8
tests/flatc/bar/baz/baz_with_ns.fbs
Normal file
8
tests/flatc/bar/baz/baz_with_ns.fbs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace baz;
|
||||
|
||||
enum Baz : short {
|
||||
None = 0,
|
||||
Red,
|
||||
Green,
|
||||
Blue,
|
||||
}
|
||||
Reference in New Issue
Block a user