-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Open
Labels
Needs InvestigationThis issue needs a team member to investigate its status.This issue needs a team member to investigate its status.
Milestone
Description
TypeScript Version: 3.8.0-dev.20200115
Search Terms:
circular type
Code
Replace
type DeepPartial<T> =
T extends Message ? PartialMessage<T> :
T;
type PartialMessage<T extends Message> = { [K in keyof T]?: DeepPartial<T[K]> };with
type DeepPartial<T> =
T extends Message ? { [K in keyof T]?: DeepPartial<T[K]> } :
T;Expected behavior:
Both works.
Actual behavior:
Type 'typeof SubMessage' is not assignable to type 'FieldValueType<SubMessage>'.
The types returned by 'from(...)' are incompatible between these types.
Property 'n' is missing in type 'Message' but required in type 'SubMessage'.(2322)
Playground Link:
Without circular type definition
Related Issues:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Needs InvestigationThis issue needs a team member to investigate its status.This issue needs a team member to investigate its status.