Skip to content

Commit 06e9806

Browse files
committed
Improve nomenclature of ES6 TypeScript defs default export
1 parent 17feb2a commit 06e9806

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

test/other/embind_tsgen_es6.d.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,5 +110,4 @@ interface EmbindModule {
110110
wstring_test(_0: string): string;
111111
}
112112
export type MainModule = WasmModule & EmbindModule;
113-
export type MainModuleFunctor = (options?: unknown) => Promise<MainModule>;
114-
export default MainModuleFunctor;
113+
export default function MainModuleFactory (options?: unknown): Promise<MainModule>;

tools/emscripten.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -632,8 +632,7 @@ def create_tsd(metadata, embind_tsd):
632632
export_interfaces += ' & EmbindModule'
633633
out += f'export type MainModule = {export_interfaces};\n'
634634
if settings.EXPORT_ES6 and settings.MODULARIZE:
635-
out += 'export type MainModuleFunctor = (options?: unknown) => Promise<MainModule>;\n'
636-
out += 'export default MainModuleFunctor;\n'
635+
out += 'export default function MainModuleFactory (options?: unknown): Promise<MainModule>;\n'
637636
return out
638637

639638

0 commit comments

Comments
 (0)