You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Type 'Kek' is not assignable to type 'Kek2'.
Type '{ meta: { tag: "A"; }; }' is not assignable to type 'Kek2'.
Type '{ meta: { tag: "A"; }; }' is not assignable to type '{ meta: { tag: "A"; }; } & { payload: number; }'.
Property 'payload' is missing in type '{ meta: { tag: "A"; }; }' but required in type '{ payload: number; }'.(2322)
input.tsx(13, 66): 'payload' is declared here.
π Expected behavior
Typechecks successfully
The text was updated successfully, but these errors were encountered:
π Search Terms
What search terms did you use when trying to find an existing bug report?
List them here so people in the future can find this one more easily.
TS doesn't support nested discriminated unions. Duplicate of #18758
Bug Report
π Version & Regression Information
Stable (v4.7.2) and nightly (v4.8.0-dev.20220608 )
β― Playground Link
Playground link with relevant code
π» Code
π Actual behavior
Type 'Kek' is not assignable to type 'Kek2'.
Type '{ meta: { tag: "A"; }; }' is not assignable to type 'Kek2'.
Type '{ meta: { tag: "A"; }; }' is not assignable to type '{ meta: { tag: "A"; }; } & { payload: number; }'.
Property 'payload' is missing in type '{ meta: { tag: "A"; }; }' but required in type '{ payload: number; }'.(2322)
input.tsx(13, 66): 'payload' is declared here.
π Expected behavior
Typechecks successfully
The text was updated successfully, but these errors were encountered: