🌐 AI搜索 & 代理 主页
Skip to content

Commit 4ced4ad

Browse files
authored
Fix types: i18n component ‘tag’ prop can also be boolean ‘false’ (#987)
Passing ‘:tag=false’ to the i18n component renders no tag, but TypeScript would complain, since the prop type was defined to allow only strings. Widen the type to also allow boolean ‘false’, which matches runtime behaviour and docs.
1 parent a416e16 commit 4ced4ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/types/volar.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ type ComponentType = DefineComponent<{
2020
* The tag to use as a root element.
2121
*/
2222
tag: {
23-
type: StringConstructor
23+
type: PropType<string | false>
2424
default: 'span'
2525
}
2626
/**

0 commit comments

Comments
 (0)