Skip to content

Allow .ts extension in imports/exports #2876

Open
@fabianhjr

Description

@fabianhjr

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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions