Closed KrakerXyz closed 3 years ago
This is correct TS behavior, please try replace construction?: string | null
to construction?: string
.
Yeah,, if only it were that simple. For better or worse, the API design has requirements for null values so we need to leave it as-is.
I'll write a typescript generic type that will convert the type to one that removes null from unions. Thanks for the quick response.
This might be by design so I totally accept that as an answer, but wanted to open an just in case it's something you could tweak to accept as valid.
When we declare a a property such as
and we try to bind construction using v-model such as
This works completely fine at runtime but we get the following from vue-tsc
Please let me know if there any additional detail you'd like me to provide.