FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

BREAKING: Make typings compatible with DOM and Node typings · Issue #3642 · NativeScript/NativeScript · GitHub

BREAKING: Make typings compatible with DOM and Node typings #3642

Description

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL