Skip to content

What is the current recommended way of getting node.d.ts typings? #4951

Closed
@bpasero

Description

@bpasero

With the release of 1.6 and tsconfig supporting module resolution, what is the current best practices to get node.d.ts typings into my project. Should I use "tsd" to get the definitions in? This sounds like a step backwards to me as I really like the new module resolution logic that would pick up d.ts files within node_modules.

My 2 cents: Some authority (either node.js or typescript) should maintain a node module that is versioned in the same way as node.js releases are and include a .d.ts file that I can depend on to code against the right version of node.js API.Whenever my node environment changes to a newer version, I would also update the npm module with its definitions.

Are there alternatives? In my current setup I do not really want to add node.d.ts into a "typings" folder because this node.d.ts file is not versioned and will very quickly be outdated when node.js API is added.

Metadata

Metadata

Assignees

No one assigned

    Labels

    QuestionAn issue which isn't directly actionable in code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions