Skip to content

bigint literal creates invalid type declaration #1250

Closed
@scottbessler

Description

@scottbessler

With the following setup:

tsgo compiled from commit 2aa0eb5d92ba30e24710a5fa95a8781ae8ef285a

tsconfig.json

{
    "compilerOptions": {
        "target": "ES2020",
        "outDir": "./dist",
        "declaration": true,
    }
}

bug.ts

export const X = 0n;

The emitted declarations are invalid:

> rm -rf dist && tsgo && cat dist/bug.d.ts
export declare const X = ;

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions