Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Typo in TS1355 error messageΒ #62464

@dangrussell

Description

@dangrussell

πŸ”Ž Search Terms

"A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals.", "TS1355"

πŸ•— Version & Regression Information

  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about error messages and typos

⏯ Playground Link

No response

πŸ’» Code

// Your code here

πŸ™ Actual behavior

Error reads "A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals."

πŸ™‚ Expected behavior

Error should read "A 'const' assertion can only be applied to references to enum members, or string, number, boolean, array, or object literals."

Additional information about the issue

The text of TypeScript error TS1355 is:

A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals.

Note "assertion_s_", plural. Since it's referring to a singular assertion, the text should be:

A 'const' assertion can only be applied to references to enum members, or string, number, boolean, array, or object literals.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Help WantedYou can do thisPossible ImprovementThe current behavior isn't wrong, but it's possible to see that it might be better in some cases

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions