microsoft / microsoft/TypeScript-Sublime-Plugin
@types not working
まだ誰も着手していません。
- 主要言語
- JavaScript
- スター
- 1.7k
- フォーク
- 236
- 平均マージ
- 21日 13時間
- マージ済み PR(30日)
- 1
説明
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.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、言及されている tsconfig.json を使って、Sublime で @types/react と typings/index.d.ts のセットアップを再現し、その後、同じプロジェクトを tsc で実行した場合と比較します。プラグインの TypeScript language-service のセットアップと設定の読み込みを調査します。エディターが手動の triple-slash reference なしで import * as React from 'react' を解決できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- typescript
- 領域
- developer-experience, tooling
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 25/100