microsoft / microsoft/TypeScript
Support JSDoc `@property`
まだ誰も着手していません。
- 主要言語
- Go
- スター
- 111k
- フォーク
- 14.3k
- 平均マージ
- 2日 4時間
- マージ済み PR(30日)
- 132
説明
From @BrunnerLivio on May 8, 2017 9:1
- VSCode Version: 1.12.1
- OS Version: Ubuntu 16.04.1 LTS (Xenial Xerus)
Example code:
MyController.js
// @ts-check
class MyController {
getWorld() {
return this.world; // <--- Marked as error
}
}
angular
.module('myApp')
.component('myComponent', {
bindings: {
'world': '<'
},
controller: MyController,
template: `<div>Hello {{$ctrl.getWorld()}}</div>`
});
The this.world is marked as error, as supposed to be. But it is actually pretty annoying, because in angular you need to use quite often those component bindings. I know there's the option // @ts-ignore, but that really pollutes the code and makes it less readable.
An extensions for this would be really useful.
I use this workaround at the moment
// @ts-check
class MyController {
constructor() {
this.world = this.world;
}
getWorld() {
return this.world;
}
}
[...]
I don't like this at all, but better than writing // @ts-ignore.
Is there any other option / workaround?
Copied from original issue: Microsoft/vscode#26192
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
この issue では、Angular コンポーネントのバインディングと this.world エラーを使用する JavaScript クラスによる再現として MyController.js が提供されています。まずその例を再現し、既存の JSDoc サポートを追跡してください。適切な @property 宣言によって @ts-ignore なしでバインディングを記述できるようになれば、作業は完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, typescript
- 領域
- compilers
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100