Skip to content

Boolean literal should be LiteralExpression #42153

Open
@Kingwl

Description

Bug Report

Sorry, In my memory there's a duplicate issue about the same problem but I can't find it out.

🔎 Search Terms

API, Boolean, Literal

🕗 Version & Regression Information

  • I was unable to test this on prior versions because It's API

⏯ Playground Link

None

💻 Code

    export interface TrueLiteral extends PrimaryExpression {
        readonly kind: SyntaxKind.TrueKeyword;
    }

    export interface FalseLiteral extends PrimaryExpression {
        readonly kind: SyntaxKind.FalseKeyword;
    }

🙁 Actual behavior

isLiteralExpression(trueLiteral) === false

🙂 Expected behavior

isLiteralExpression(trueLiteral) === true

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    APIRelates to the public API for TypeScriptBugA bug in TypeScript

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions