#Any idea why TS is not throwing error?

1 messages · Page 1 of 1 (latest)

twilit vortexBOT
#

@smoky mulch Here's a shortened URL of your playground link! You can remove the full link from your message.

stormerino123#0

Preview:```ts
type ButtonCustomVariant =
| {
variant: {
primary: string
secondary: string
}
size: string
}
| {
variant: {
tertiary: string
}
}

const a: ButtonCustomVariant = {
variant: {
tertiary: "hi"
...```

regal island
#

@smoky mulch Unions in typescript are generally not exclusive.