Skip to content

Commit d833c39

Browse files
authored
[tsgen] Ignore checking library types when generating TS definitions. (#23019)
We don't need to validate other types when generating definitions since they may be in bad state. Fixes #22996
1 parent 44d51c8 commit d833c39

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tools/emscripten.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,11 @@ def create_tsd_exported_runtime_methods(metadata):
651651
tsc = [tsc]
652652
else:
653653
tsc = shared.get_npm_cmd('tsc')
654-
cmd = tsc + ['--outFile', tsc_output_file, '--declaration', '--emitDeclarationOnly', '--allowJs', js_doc_file]
654+
cmd = tsc + ['--outFile', tsc_output_file,
655+
'--skipLibCheck', # Avoid checking any of the user's types e.g. node_modules/@types.
656+
'--declaration',
657+
'--emitDeclarationOnly',
658+
'--allowJs', js_doc_file]
655659
shared.check_call(cmd, cwd=path_from_root())
656660
return utils.read_file(tsc_output_file)
657661

0 commit comments

Comments
 (0)