Questions tagged [tsd]

TSD is a package manager to search and install TypeScript definition files directly from the community driven DefinitelyTyped repository.

105 questions
61
votes
4 answers

How should I use @types with TypeScript 2

So far we are used to tsd or (The better version of it) typings But now that TypeScript 2 offers the new @types feature, how should I convert my current project to work with @types? I have tsd.json (typings.json is some cases) with all the…
gilamran
  • 7,090
  • 4
  • 31
  • 50
52
votes
9 answers

"exclude" property of tsconfig.json is not being respected

I am working with the excellent Express/Node/Typescript example code found here. It transpiles the .ts code with the following command from run.sh: ./node_modules/.bin/tsc --sourcemap --module commonjs ./bin/www.ts This works as advertised, but I…
Ken
  • 797
  • 1
  • 5
  • 11
22
votes
1 answer

WebStorm becomes very slow for any typescript files

Webstorm runs ok when I open ts files, but once I compile, the whole program becomes super slow. I don't run watch, just simply run tsc. I also check off "enable typescript compiler" option and "resolve objects using tsconfig.json" from webstorm's…
mat
  • 257
  • 2
  • 5
20
votes
2 answers

What to do if a typings (or tsd) is not available?

I was looking over the TypeScript handbook and I can't seem to find the answer. If I am using a library that no typings exist, what are my options? One is to create the typings file, but this I don't really want to do. What are my other options, I…
Martin
  • 23,844
  • 55
  • 201
  • 327
18
votes
1 answer

Using webpack to generate typescript libraries with typing files

Currently my process for building is: Write lots of typescript files with ES6 module syntax Generate an index.ts which re-exports all modules from one point Compile to CommonJS + System Output Descriptor/Typing files This results in an index.js…
Grofit
  • 17,693
  • 24
  • 96
  • 176
16
votes
5 answers

How to install express in typings?

I am trying to use expressjs in my app. After installing it using typings install express --ambient --save, I run tsc, but I get two errors: typings/main/ambient/express/index.d.ts(17,34): error TS2307: Cannot find module 'serve-static'. …
MuriloKunze
  • 15,195
  • 17
  • 54
  • 82
14
votes
1 answer

Why is TSD deprecated?

Official tsd annouced that tsd is deprecated and recommend using typings instead. Why is TSD deprecated? What is the difference between tsd and typings. What is the advantage of typings?
Takuro Wada
  • 266
  • 3
  • 9
11
votes
2 answers

How do I add a TypeScript definitely typed definition in ASP.NET 5?

I'm trying to install TypeScript definition files from DefinitelyTyped within a ASP.NET v5 web project in Visual Studio 2015 RC? NuGet packages don't seem to work anymore and TSD hasn't been updated in awhile and I haven't seen a lot of good…
Orion Adrian
  • 19,053
  • 13
  • 51
  • 67
9
votes
3 answers

How to install .d.ts file from github:DefinitelyTypes using typings

I used tsd which is now deprecated and am trying to use typings. The typings repository is very small, and I can't find any of the d.ts files I need. All the files I need are in GitHub DefinitelyTyped repository, but I can't find a way to install…
pierrebo
  • 904
  • 2
  • 10
  • 22
8
votes
1 answer

What is the best solution for type definition management system(like tsd) for Typescript?

When it comes to use Typescript, we need to consider how to resolve type definition files (*.d.ts). As long as I know, there are several systems for managing typescript definition system as below. tsd typings @types I guess tsd is the oldest one…
kyasbal
  • 1,132
  • 3
  • 12
  • 27
8
votes
1 answer

Define a property as string or function that returns a string in Typescript

I want to create an interface where a property can be either a string or a Function that has to return a string. I currently have the following: interface IExample { prop: string|Function; } But that's not explicit enough for me because the…
Sebastian Sebald
  • 16,130
  • 5
  • 62
  • 66
8
votes
3 answers

gulp typescript throws error TS2300: Duplicate identifier 'moment'

I have an Angular application generated using Yeoman gulp typescript generator. Suddenly without any apparent reason (change in project) during build typescript started throwing errors: .tmp/typings/moment/moment-node.d.ts(6,16): error TS2300:…
8
votes
3 answers

Compile issues with npm typescript@1.4.1 on Windows

I installed the TSC with NPM yesterday and when I download the last Typescript definitions from the repository with tsd@0.5.7 and I proceed to compile my code I got a lot of compile errors from the definitions. The only way that I have found to fix…
dante_dubon
  • 305
  • 1
  • 6
7
votes
1 answer

How to install d.ts for specific version of node.js?

Using the tsd command I ran this command tsd install node It install the definitions file in the typings/node/node.d.ts but I can see that this definition file is for node.js version 4 Node.js v4.x API How do I install the tsd for node version…
Dmitri
  • 34,780
  • 9
  • 39
  • 55
7
votes
1 answer

How do I remove typescript definition?

I found some definition were necessary for me. I tried to remove but I couldn't find the specify command. It's not like npm it has uninstall command can directly uninstall them, so I just remove the ones from tsd.json without typing uninstall…
Tony
  • 1,019
  • 2
  • 13
  • 25
1
2 3 4 5 6 7