microsoft / microsoft/TypeScript
inline comments are striped in emitted declaration files
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Go
- Sterne
- 111k
- Forks
- 14.3k
- Ø Merge
- 2 T. 4 Std.
- Gemergte PRs (30 T.)
- 132
Beschreibung
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

And correctly kept within transpiled files

Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, das Problem mit der bereitgestellten tsconfig und dem TypeScript-Beispiel unter Verwendung von TypeScript 3.1.3 oder typescript@next zu reproduzieren. Vergleiche die erzeugten Declaration-Dateien mit den transpilierten Dateien; abgeschlossen ist die Aufgabe, wenn Inline-Kommentare in der Declaration-Ausgabe neben Blockkommentaren erhalten bleiben.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- typescript
- Bereich
- compilers
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 42/100