2

I work on multiple TypeScript projects. I have common TypeScript code that I'd like to consume for multiple projects. How do I do this?

I expected to find something like TypeScript Library Project in Visual Studio's Add new project window, but that does not exist.

V Maharajh
  • 9,013
  • 5
  • 30
  • 31
  • My first thoughts is that in Typescript it is a d.ts file http://www.typescriptlang.org/Handbook#writing-dts-files – David Laberge Mar 23 '15 at 18:17
  • From reading that, I get the impression that d.ts is used to create a TypeScript façade over an existing JavaScript library. I don't think it can help me solve this problem. (Thanks for the link though, I learnt something new) – V Maharajh Mar 23 '15 at 18:31
  • Here an other link : https://typescript.codeplex.com/workitem/571 – David Laberge Mar 23 '15 at 18:38
  • Thanks. I opened a similar issue in their new GitHub project. – V Maharajh Mar 23 '15 at 19:13
  • 2
    My approach would be to maintain it in a single project, and use some kind of a build process (through Gulp or Grunt) to create js and.d.ts file that you would reuse and publish via a package manager like bower or npm or NuGet – Hugues Stefanski Mar 23 '15 at 19:27
  • Here's a relevant issue on the GitHub Project : https://github.com/Microsoft/TypeScript/issues/11 – V Maharajh Mar 23 '15 at 20:14

0 Answers0