mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
12 lines
425 B
Plaintext
12 lines
425 B
Plaintext
destructuringFromUnionSpread.ts(5,9): error TS2339: Property 'a' does not exist on type '{ a: string; } | { b: number; }'.
|
|
|
|
|
|
==== destructuringFromUnionSpread.ts (1 errors) ====
|
|
interface A { a: string }
|
|
interface B { b: number }
|
|
|
|
declare const x: A | B;
|
|
const { a } = { ...x } // error
|
|
~
|
|
!!! error TS2339: Property 'a' does not exist on type '{ a: string; } | { b: number; }'.
|
|
|