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
…emscripten-core#23019)

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 authored and hedwigz committed Dec 18, 2024
1 parent 160c97f commit 2337a41
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 @@ -651,7 +651,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 2337a41

Please sign in to comment.