-
Notifications
You must be signed in to change notification settings - Fork 54
Open
Labels
Description
Package Version: _______
- nodejs
- nodejs version: ______
- os name/version: _____
- browser
- name/version: all
Describe the bug
Adding@azure/ms-rest-package
automatically adds@types/node
type definitions. We are working on a React/Typescript project which targets es5 and addingms-rest-js
reference internally pulls in @types/node which pulls in library definitions for es2018
- name/version: all
Due to this typescript compiler does not fail the build if newer ES features are used while targeting older ES runtimes.
Screenshots
Enabling "explainFiles" in typescript configs shows @types/node is added by 'node_modules/@azure/ms-rest-js/es/lib/webResource.d.ts' file.
To Reproduce
- Go to replit (https://replit.com/@mashenoy/ms-rest-js-sample) (You will need to fork the repl)
- Run
./node_modules/.bin/tsc -p tsconfig.json
in the shell. @types/node
types is added bynode_modules/@azure/ms-rest-js/es/lib/webResource.d.ts
file (shown by explain files tsc compiler option)
Expected behavior
@azure/ms-rest-js
should not pollute lib definitions of consuming applications.