Skip to content

template literals support: Only declares and type imports are allowed inside declare module. #188

@unional

Description

@unional

Seems like there is a bug when transforming template literals:

export type StoreVersion = `${number}.${number}.${number}` | number;

transforms to:

declare export type StoreVersion = undefined: /* NO PRINT IMPLEMENTED: TemplateLiteralType */ any | number;

Which flowgen crash caused by SyntaxError when checking by pretter:

SyntaxError: Only declares and type imports are allowed inside declare module

I have a repo here: https://github.com/unional/global-store/tree/flow (pnpm build:flow)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions