forked from vuejs/core
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(types): ensure createBlock() helper accepts Teleport and Supsense…
… types (fix: vuejs#2855) (vuejs#5458) Co-authored-by: Carlos Rodrigues <carlos@hypermob.co.uk>
- Loading branch information
1 parent
402f3da
commit 32c82e4
Showing
2 changed files
with
24 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { | ||
expectType, | ||
createBlock, | ||
VNode, | ||
Teleport, | ||
Text, | ||
Static, | ||
Comment, | ||
Fragment, | ||
Suspense, | ||
defineComponent | ||
} from './index' | ||
|
||
expectType<VNode>(createBlock(Teleport)) | ||
expectType<VNode>(createBlock(Text)) | ||
expectType<VNode>(createBlock(Static)) | ||
expectType<VNode>(createBlock(Comment)) | ||
expectType<VNode>(createBlock(Fragment)) | ||
expectType<VNode>(createBlock(Suspense)) | ||
expectType<VNode>(createBlock(defineComponent({}))) |