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

Make tester work with @types feature #19

@kant2002

Description

@kant2002

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions