microsoft / microsoft/TypeScript-Sublime-Plugin

@types not working

Open
#537 10 comments 6 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.