Skip to content

octal escape sequence literal type #39038

Closed
@xiaoxiangmoe

Description

@xiaoxiangmoe

TypeScript Version: 3.9.4

Search Terms:
literal type, type inference
Code

const c :'Copyright ©'= "Copyright \251"

Expected behavior:

No error or warning for octal escape sequence

Actual behavior:

Type '"Copyright 251"' is not assignable to type '"Copyright ©"'.

Playground Link:
Playground Link
Related:

https://eslint.org/docs/rules/no-octal-escape

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScript

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions