-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issue
Milestone
Description
Bug Report
🔎 Search Terms
Intrinsic string manipulation types,Uppercase, Lowercase, Capitalize, Uncapitalize
🕗 Version & Regression Information
Since 4.8.4.
Uppercase<string>
use to resolve to string
between 4.1.5 and 4.7.4
The behaviour in 4.8.4 is not the same as in 4.9.5 / Nightly
⏯ Playground Link
Playground link with relevant code
💻 Code
type Obj = {} extends Uppercase<string> ? true : false // true
type Unk = unknown extends Uppercase<string> ? true : false // true
🙁 Actual behavior
The return value is true
. It should not be, because intrinsic string manipulation types should resolve to subtypes of string
(or string
at the very least), and {}
or unknown
are not assignable to string
.
🙂 Expected behavior
I expected the return type to be false.
DetachHeadfatcerberus
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issue