microsoft / microsoft/TypeScript
Handling AssemblyScript input 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
(Continuing from https://github.com/Microsoft/TypeScript/issues/10939)
I'd like to add another use case:
AssemblyScript. :)
It could be handy to have both .ts and .as files, to disambiguate the two.
For example, at the moment I have both src/ts/ and src/as/ folders to disambiguate the two.
It would also then be possible to have both some-project/index.ts and some-project/index.as, and which one is being imported in import foo from 'some-project' would depend on the file type.
The AssemblyScript guys are currently discussing how to make Node-style module resolution work, with the idea of an asmain field in package.json similar to main but for AS code, or defaulting to assembly/index.ts when there's no asmain field, because of ambiguity between AS and TS files.
Having an assembly/ folder at the root of a project (IMO) doesn't follow the convention in the web/JS community of having a src folder for sources.
If not allowing custom extensions for this, would the TypeScript team rather add another official extension? Perhaps even official AS types into the mix for such files (i32, i64, f32, etc, instead of just number)?
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 mit dem verknüpften TypeScript issue #10939 und AssemblyScript issue #448. Überprüfe anschließend die vorgeschlagene .as-Erweiterung, das Layout von src/ts und src/as sowie die package.json-asmain-Idee. Für den Abschluss wäre ein beschlossener Ansatz erforderlich, um zwischen TypeScript- und AssemblyScript-Eingaben zu unterscheiden und Importe zwischen ihnen aufzulösen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- typescript
- Bereich
- compilers
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100