mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-28 05:48:06 +00:00
TS/JS: Export object based classes on entry (#7822)
* TS/JS: Export object based classes on entry
Along with the non object ones, for consistency. This is a regression
introduced recently.
Before:
`export { UpdateSettingsRequest } from './worker/update-settings-request.js';`
Now:
`export { UpdateSettingsRequest, UpdateSettingsRequestT } from './worker/update-settings-request.js';`
* only export object based classes for structs
Enums are not elegible.
---------
Co-authored-by: Björn Harrtell <bjornharrtell@users.noreply.github.com>
Co-authored-by: Derek Bailey <derekbailey@google.com>
This commit is contained in:
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
||||
return to;
|
||||
};
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||||
// If the importer is in node compatibility mode or this is not an ESM
|
||||
// file that has been converted to a CommonJS file using a Babel-
|
||||
// compatible transform (i.e. "__esModule" has not been set), then set
|
||||
// "default" to the CommonJS "module.exports" for node compatibility.
|
||||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||||
mod
|
||||
));
|
||||
@@ -27,10 +31,15 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
||||
var example_exports = {};
|
||||
__export(example_exports, {
|
||||
ArrayStruct: () => ArrayStruct,
|
||||
ArrayStructT: () => ArrayStructT,
|
||||
ArrayTable: () => ArrayTable,
|
||||
ArrayTableT: () => ArrayTableT,
|
||||
InnerStruct: () => InnerStruct,
|
||||
InnerStructT: () => InnerStructT,
|
||||
NestedStruct: () => NestedStruct,
|
||||
NestedStructT: () => NestedStructT,
|
||||
OuterStruct: () => OuterStruct,
|
||||
OuterStructT: () => OuterStructT,
|
||||
TestEnum: () => TestEnum
|
||||
});
|
||||
module.exports = __toCommonJS(example_exports);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
export { ArrayStruct } from './example/array-struct.js';
|
||||
export { ArrayTable } from './example/array-table.js';
|
||||
export { InnerStruct } from './example/inner-struct.js';
|
||||
export { NestedStruct } from './example/nested-struct.js';
|
||||
export { OuterStruct } from './example/outer-struct.js';
|
||||
export { ArrayStruct, ArrayStructT } from './example/array-struct.js';
|
||||
export { ArrayTable, ArrayTableT } from './example/array-table.js';
|
||||
export { InnerStruct, InnerStructT } from './example/inner-struct.js';
|
||||
export { NestedStruct, NestedStructT } from './example/nested-struct.js';
|
||||
export { OuterStruct, OuterStructT } from './example/outer-struct.js';
|
||||
export { TestEnum } from './example/test-enum.js';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
export { ArrayStruct } from './example/array-struct.js';
|
||||
export { ArrayTable } from './example/array-table.js';
|
||||
export { InnerStruct } from './example/inner-struct.js';
|
||||
export { NestedStruct } from './example/nested-struct.js';
|
||||
export { OuterStruct } from './example/outer-struct.js';
|
||||
export { ArrayStruct, ArrayStructT } from './example/array-struct.js';
|
||||
export { ArrayTable, ArrayTableT } from './example/array-table.js';
|
||||
export { InnerStruct, InnerStructT } from './example/inner-struct.js';
|
||||
export { NestedStruct, NestedStructT } from './example/nested-struct.js';
|
||||
export { OuterStruct, OuterStructT } from './example/outer-struct.js';
|
||||
export { TestEnum } from './example/test-enum.js';
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
export { ArrayStruct } from './example/array-struct.js';
|
||||
export { ArrayTable } from './example/array-table.js';
|
||||
export { InnerStruct } from './example/inner-struct.js';
|
||||
export { NestedStruct } from './example/nested-struct.js';
|
||||
export { OuterStruct } from './example/outer-struct.js';
|
||||
export { ArrayStruct, ArrayStructT } from './example/array-struct.js';
|
||||
export { ArrayTable, ArrayTableT } from './example/array-table.js';
|
||||
export { InnerStruct, InnerStructT } from './example/inner-struct.js';
|
||||
export { NestedStruct, NestedStructT } from './example/nested-struct.js';
|
||||
export { OuterStruct, OuterStructT } from './example/outer-struct.js';
|
||||
export { TestEnum } from './example/test-enum.js';
|
||||
|
||||
Reference in New Issue
Block a user