javascript - Use TypeScript lib.core.d.ts instead of lib.d.ts -


it seems typescript compiler includes lib.d.ts or lib.es6.d.ts (depending on compiler target).

in our application have websocket class defined in lib.d.ts. we're running our application under node.js , not in web browser, don't need of definitions lib.d.ts. instead lib.core.d.ts sufficient (and solve websocket conflict of course).

is possible tell typescript compiler global type definition file use?

use --nolib compiler option exclude lib.d.ts , add reference lib.core.d.ts in source files.

equivalent tsconfig.json "nolib": true.

if need node.js definitions, can use definitely typed one.


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

c# - Exception when attempting to modify Dictionary -