microsoft / microsoft/TypeScript
Feature request: Ignore JS files when generating declarations
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
Suggestion
🔍 Search Terms
ignore js files generate declarations
✅ Viability Checklist
My suggestion meets these guidelines:
- This wouldn't be a breaking change in existing TypeScript/JavaScript code
- This wouldn't change the runtime behavior of existing JavaScript code
- This could be implemented without emitting different JS based on the types of the expressions
- This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
- This feature would agree with the rest of TypeScript's Design Goals.
⭐ Suggestion
The docs for the declaration tsconfig option say:
Generate .d.ts files for every TypeScript or JavaScript file inside your project.
What if it was just TS files, and JS files were ignored?
📃 Motivating Example
I'm getting a bunch of declaration emit errors in JS files. I would rather just ignore them; I'll be converting them to TS eventually and will get higher fidelity. But until then, I'd rather not try to figure out how to annotate the JS to solve this problem.
💻 Use Cases
I'm getting errors that I don't care about.
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
Es werden keine Implementierungsdateien oder Tests genannt. Beginne damit, die tsconfig-Option declaration durch den TypeScript-Compiler und seine Tests für die Declaration-Ausgabe zu verfolgen; abgeschlossen ist es, wenn JavaScript-Dateien von der Declaration-Generierung ausgeschlossen werden, während TypeScript-Dateien weiterhin Declarations ausgeben.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, typescript
- Bereich
- compilers
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100