Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate from TSD to Typings #63

Open
KerryRitter opened this issue Apr 29, 2016 · 1 comment
Open

Migrate from TSD to Typings #63

KerryRitter opened this issue Apr 29, 2016 · 1 comment

Comments

@KerryRitter
Copy link

Running npm install gives the following warning:

npm WARN deprecated tsd@0.6.5: TSD is deprecated in favor of Typings (https://github.com/typings/typings) - see DefinitelyTyped/tsd#269 for more information

@Justin-Credible
Copy link
Owner

Re-posting this from a comment on a PR to add replace tsd with typings:


Firstly, IMHO the main benefit of typings over tsd is the paradigm shift in how type definitions are written. This means moving away from ambient modules that pollute the global namespace towards external modules that are well contained. This is an excellent change!

Unfortunately, most of the type definitions in use by this project haven't been converted to external modules when I checked. So, while typings can include the existing ambient modules from the definitely typed repository, we'd still be using the original ambient modules.


Secondly, I found that the typings CLI tool isn't as flexible as tsd is.

Currently, this project has two tsd configuration files: tsd.json for type definitions used by the application and tsd.tests.json for type definitions specific to the unit testing.

The tsd command line tool allows you to specify which configuration file to use (tsd rebundle --config tsd.tests.json) while typings does not. So I would have to move from the current directory structure of:

│   tsd.json
│   tsd.tests.json
│
├───typings
└───typings-tests

to the the following directory structure (which is more convoluted IMO):

├───typings-app
│   │   typings.json
│   │
│   └───typings
└───typings-tests
    │   typings.json
    │
    └───typings

This also makes it more work to run the CLI tool as you have to cd into the appropriate directory before running the command.


I'll eventually move to typings are more type definitions become available as external modules and/or the tool becomes more flexible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants