Skip to content

Commit 17feb2a

Browse files
committed
Include options param in default functor export for --emit-tsd
This serves as a starting point for incluing all options such as `locateFile` (and the slew of others), without requiring manually iterating through them
1 parent 27cd123 commit 17feb2a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

test/other/embind_tsgen_es6.d.ts

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

tools/emscripten.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,7 +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 = () => Promise<MainModule>;\n'
635+
out += 'export type MainModuleFunctor = (options?: unknown) => Promise<MainModule>;\n'
636636
out += 'export default MainModuleFunctor;\n'
637637
return out
638638

0 commit comments

Comments
 (0)