Our 2.x typings contain a lot of definitions for types that are a part of the DOM (tsconfig.json: "lib:" ["dom"]) or Node (depending on @types/node) typings. This gets us many clashing type definitions when a client app adds dependencies on those libraries.
The solution:
- Get rid of our DOM-like typings (Promise, Map, Set, etc) and use the DOM ones.
- require "lib": ["dom"] in application tsconfig.json files. We'll update project templates to include that automatically.
- Remove our Node-like typings and use a subset of the ones in @node/types, making sure we have the exact same definitions: NodeJS.Global, NodeRequire, NodeModule.
- DO NOT require client apps to use @types/node. Those should compile cleanly both with and without a @node/types dependency.
- Rename clashing types in platform typings. e.g. iOS UIEvent interface becomes _UIEvent
Reactions are currently unavailable
Our 2.x typings contain a lot of definitions for types that are a part of the DOM (tsconfig.json: "lib:" ["dom"]) or Node (depending on @types/node) typings. This gets us many clashing type definitions when a client app adds dependencies on those libraries.
The solution: