Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

Make tester work with @types feature #19

Open
kant2002 opened this issue Jul 11, 2016 · 2 comments
Open

Make tester work with @types feature #19

kant2002 opened this issue Jul 11, 2016 · 2 comments

Comments

@kant2002
Copy link

There upcoming feature in the upcoming Typesscript 2.0 which allow use node_modules/@types folder to store TypeScript definitions and there already exists porting efforts to that stratecy of deliverying TypeScript definitions. See https://github.com/DefinitelyTyped/DefinitelyTyped/tree/types-2.0

Current tester not working with new definitions because it could not resolve definitions using ///<reference types="..." /> format.

Would be reasonable to make this work for this scenario too.

I make this work by modifying src/tsc/Tsc.ts file by including additional command line options --typeRoots . --types jquery. That's very dirty, and just to give proof of concept. Full fix should include additional parameter which to dt and some other changes probably should be required on TypeScript side.

Now more about the change:

  1. Make root folder of DefintelyTyped as source folder for definitions --typeRoots .
  2. Fix error in the latest TypeScript which gives following error
error TS2688: Cannot find type definition file for '.git'.
error TS2688: Cannot find type definition file for 'gsap'.
error TS2688: Cannot find type definition file for 'node_modules'.
error TS2688: Cannot find type definition file for 'scripts'.
error TS2688: Cannot find type definition file for 'swipe.js'.

if some dummy existing types module does not provided. That's why --types jquery

@vvakame
Copy link
Member

vvakame commented Jul 11, 2016

@RyanCavanaugh ?

@RyanCavanaugh
Copy link
Member

Already in progress

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

No branches or pull requests

3 participants