Skip to content

Commit 8768f45

Browse files
authored
fix(types): avoid svelte type collisions between element and component props (#266)
1 parent d8fbad9 commit 8768f45

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/build-svelte-types.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ interface ${componentName}Events extends Record<'',{}>{}
147147
declare class ${componentName} extends SvelteComponent<
148148
${componentName}Props${
149149
svelteElementType
150-
? ` & ${svelteElementType}`
150+
? ` & Omit<${svelteElementType}, keyof Props>`
151151
: nativeElementType
152-
? ` & HTMLAttributes<${nativeElementType}>`
152+
? ` & Omit<HTMLAttributes<${nativeElementType}>, keyof Props>`
153153
: ''
154154
},
155155
${componentName}Events,

0 commit comments

Comments
 (0)