assemblyscript icon indicating copy to clipboard operation
assemblyscript copied to clipboard

Allow `.ts` extension in imports/exports

Open fabianhjr opened this issue 1 year ago • 1 comments

Feature suggestion

Eg, deno / bun allow and prefer something like

export { Parser0 } from "./parsers/Parser0.ts";
export { Parser } from "./parsers/Parser.ts";
export { ParserResult } from "./parsers/ParserResult.ts";

But AssemblyScript complains:

ERROR TS6054: File 'src/parsers/Parser0.ts.ts' not found.
   :
 1 │ export { Parser0 } from "./parsers/Parser0.ts";
   │                         ~~~~~~~~~~~~~~~~~~~~~~
   └─ in src/index.ts(1,25)

ERROR TS6054: File 'src/parsers/Parser.ts.ts' not found.
   :
 2 │ export { Parser } from "./parsers/Parser.ts";
   │                        ~~~~~~~~~~~~~~~~~~~~~
   └─ in src/index.ts(2,24)

ERROR TS6054: File 'src/parsers/ParserResult.ts.ts' not found.
   :
 3 │ export { ParserResult } from "./parsers/ParserResult.ts";
   │                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~
   └─ in src/index.ts(3,30)

fabianhjr avatar Oct 11 '24 05:10 fabianhjr

Did an initial attempt but seems to be slightly more involved: https://github.com/AssemblyScript/assemblyscript/pull/2875

fabianhjr avatar Oct 11 '24 05:10 fabianhjr