#Type depends on type of other var, how?
4 messages · Page 1 of 1 (latest)
4 messages · Page 1 of 1 (latest)
const value: Item[] | Item | null | undefined
const isArray?: boolean
Is it possible to have the tpe of value set to either (Item[] | null | undefined) | (Item | null | undefined) depending on isArray?
no, since they aren't linked at all here
hm, could have been a nice feature.
you can pack them into an object if you want to encode this relationship