microsoft / microsoft/TypeScript

inline comments are striped in emitted declaration files

オープン
#28,199 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

Needs Proposal Suggestion
主要言語
Go
スター
111k
フォーク
14.3k
平均マージ
1日 19時間
マージ済み PR(30日)
117

説明

TypeScript Version: 3.1.3

Search Terms: inline comments striped

tsconfig

{
  "compilerOptions": {
    "moduleResolution": "node",
    "module": "esnext",
    "target": "es5",
    "lib": [
      "dom",
      "es2018"
    ],
    "strict": true,
    "esModuleInterop": true,
    "allowSyntheticDefaultImports": true,
    "suppressImplicitAnyIndexErrors": true,
    "forceConsistentCasingInFileNames": true,
    "jsx": "react",
    "sourceMap": true,
    "outDir": "dist/esm5",
    "declaration": true,
    "declarationDir": "dist/types",
    "declarationMap": true,
    "stripInternal": true,
    "resolveJsonModule": true,
    "importHelpers": true
  },
  "include": [
    "./src"
  ],
  "compileOnSave": false,
  "buildOnSave": false
}

Code:

// I'll be missing after tsc 😭

/**
 * I'll be here after tsc 😎
 */

export const api = () => { /* some code ... */ } 

Expected behavior:

Keeping both block and inline comments in declaration files in both transpiled files and declaration files

Actual behavior:

Inline comments are removed in declaration files
image

And correctly kept within transpiled files
image

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

提供された tsconfig と TypeScript の例を使い、TypeScript 3.1.3 または typescript@next で問題を再現することから始めます。生成された宣言ファイルとトランスパイルされたファイルを比較します。宣言出力でブロックコメントとともにインラインコメントが保持されれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
typescript
領域
compilers
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
42/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。