Skip to content

Commit 17a0b03

Browse files
authored
[tsgen] Remove deprecated outFile. (#26836)
The `outFile` argument isn't needed since we just generate definitions from a single bundled file already. Fixes #26534
1 parent 0d03fd8 commit 17a0b03

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

tools/emscripten.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -656,8 +656,8 @@ def create_tsd_exported_runtime_methods(metadata):
656656
snippet = ' = null'
657657
js_doc += f'{docs}\nRuntimeExports[\'{name}\']{snippet};\n'
658658

659-
js_doc_file = in_temp('jsdoc.js')
660-
tsc_output_file = in_temp('jsdoc.d.ts')
659+
file = 'jsdoc'
660+
js_doc_file = in_temp(f'{file}.js')
661661
utils.write_file(js_doc_file, js_doc)
662662
tsc = shared.get_npm_cmd('tsc', missing_ok=True)
663663
# Prefer the npm install'd version of tsc since we know that one is compatible
@@ -669,13 +669,12 @@ def create_tsd_exported_runtime_methods(metadata):
669669
exit_with_error('tsc executable not found in node_modules or in $PATH')
670670
# Use the full path from the which command so windows can find tsc.
671671
tsc = [tsc]
672-
cmd = tsc + ['--outFile', tsc_output_file,
673-
'--skipLibCheck', # Avoid checking any of the user's types e.g. node_modules/@types.
672+
cmd = tsc + ['--skipLibCheck', # Avoid checking any of the user's types e.g. node_modules/@types.
674673
'--declaration',
675674
'--emitDeclarationOnly',
676675
'--allowJs', js_doc_file]
677676
shared.check_call(cmd, cwd=path_from_root())
678-
return utils.read_file(tsc_output_file)
677+
return utils.read_file(in_temp(f'{file}.d.ts'))
679678

680679

681680
def create_tsd(metadata, embind_tsd):

0 commit comments

Comments
 (0)