types: the returned type of `resolveComponent` mismatch the argument type of `h`
Version
3.0.0
Reproduction link
https://codesandbox.io/s/polished-wind-py4gs?file=/src/index.ts
Steps to reproduce
click the reproduction link.
What is expected?
no type error.
What is actually happening?
type check failed.
@edison1105 Thanks for replying. your workaround works in the case above. but there is a case in which the paramerter passed to resolveComponent
is dynamic:
//value of tagName can be builtin html tag name such as 'div' or custom global component name 'my-button' for example.
// in the former situation, type of resolveComponent(tagName) shoud be cast as `string`, while in the latter should be `ComponentOptions`.
const tagName = getTagName();
resolveComponent(tagName);