Skip to content

Commit

Permalink
[tsgen] Ignore checking library types when generating TS definitions.
Browse files Browse the repository at this point in the history
We don't need to validate other types when generating definitions since
they may be in bad state.

Fixes emscripten-core#22996
  • Loading branch information
brendandahl committed Nov 26, 2024
1 parent d0a2dce commit 5b5cd86
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tools/emscripten.py
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,11 @@ def create_tsd_exported_runtime_methods(metadata):
tsc = [tsc]
else:
tsc = shared.get_npm_cmd('tsc')
cmd = tsc + ['--outFile', tsc_output_file, '--declaration', '--emitDeclarationOnly', '--allowJs', js_doc_file]
cmd = tsc + ['--outFile', tsc_output_file,
'--skipLibCheck', # Avoid checking any of the user's types e.g. node_modules/@types.
'--declaration',
'--emitDeclarationOnly',
'--allowJs', js_doc_file]
shared.check_call(cmd, cwd=path_from_root())
return utils.read_file(tsc_output_file)

Expand Down

0 comments on commit 5b5cd86

Please sign in to comment.