microsoft / microsoft/TypeScript-Sublime-Plugin
@types not working
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.7k
- Forks
- 236
- Avg merge
- 21d 13h
- Merged PRs (30d)
- 1
Description
Let's suppose I installed @types/react and added compilerOptions.types["react"] to the tsconfig.json. Then I'm trying to do import * as React from 'react' and sublime says: module react is not found.
Same goes if I install types with typings and add them via include["typings/index.d.ts"]. The only way which works is to manually do /// <reference path="typings/index.d.ts" />.
What is going on? I'm using TypeScript 2.0.3 both locally and globally. Executing tsc on a project doesn't produce any such errors.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the @types/react and typings/index.d.ts setups in Sublime with the mentioned tsconfig.json, then compare them with the same project run through tsc. Inspect the plugin's TypeScript language-service setup and its configuration loading; done means the editor resolves import * as React from 'react' without a manual triple-slash reference.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100