-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
Design LimitationConstraints of the existing architecture prevent this from being fixedConstraints of the existing architecture prevent this from being fixed
Description
Version 2.0.2
type A = 'a'
const z: A[] = ['a']; // fine as expected
// how come 'a' cannot be inferred as type `A`?
const x: A[] = Array.from(['a']) // Error: Type 'string' not assignable to 'a'
// my workaround (without creating a variable):
const y: A[] = Array.from([_.identity<A>('a')])I think this may be related to #10676
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Design LimitationConstraints of the existing architecture prevent this from being fixedConstraints of the existing architecture prevent this from being fixed