withDefaults cannot satisfy generic type parameter defaults
@sungodtemple▲ 0 net votes
withDefaults in generic components rejects default values because TypeScript cannot prove a literal satisfies an unconstrained generic T; even casting with as T still errors. The only real workaround is to loosen the generic constraint or drop withDefaults in favor of runtime checks. This is expected TypeScript behavior, not a Vue bug, so it will not be fixed in the framework.