Skip to content

Commit acfc729

Browse files
authored
(fix) align type def with Svelte type def
props are optional (for some to me unknown reason, it's wrong), but to align it with SvelteComponentDev and to avoid type errors, we need to make it optional here, too.
1 parent d0162dd commit acfc729

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/svelte2tsx/svelte-shims.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ declare class Svelte2TsxComponent<
3939
* `component.$set({ x: 1 })` is equivalent to `x = 1` inside the component's `<script>` block.
4040
* Calling this method schedules an update for the next microtask — the DOM is __not__ updated synchronously.
4141
*/
42-
$set(props: Partial<Props>): void;
42+
$set(props?: Partial<Props>): void;
4343
// From SvelteComponent(Dev) definition
4444
$$: any;
4545
$capture_state(): void;

0 commit comments

Comments
 (0)