|
| 1 | +declare module 'svelte/transitionary' { |
| 2 | + import { SvelteComponent, Component, type ComponentConstructorOptions } from 'svelte'; |
| 3 | + // Support using the component as both a class and function during the transition period |
| 4 | + // prettier-ignore |
| 5 | + export interface TransitionaryComponentType { |
| 6 | + ( |
| 7 | + ...args: Parameters<Component<Record<string, any>>> |
| 8 | + ): ReturnType<Component<Record<string, any>, Record<string, any>>> |
| 9 | + new (o: ComponentConstructorOptions): SvelteComponent |
| 10 | + } |
| 11 | +} |
1 | 12 | declare module '*.svelte' {
|
2 | 13 | // use prettier-ignore for a while because of https://github.com/sveltejs/language-tools/commit/026111228b5814a9109cc4d779d37fb02955fb8b
|
3 | 14 | // prettier-ignore
|
4 |
| - import { SvelteComponent, Component, type ComponentConstructorOptions } from 'svelte' |
5 |
| - |
6 |
| - // Support using the component as both a class and function during the transition period |
7 |
| - // prettier-ignore |
8 |
| - export interface ComponentType { |
9 |
| - ( |
10 |
| - ...args: Parameters<Component<Record<string, any>>> |
11 |
| - ): ReturnType<Component<Record<string, any>, Record<string, any>>> |
12 |
| - new (o: ComponentConstructorOptions): SvelteComponent |
13 |
| - } |
14 |
| - const Comp: ComponentType; |
| 15 | + import { SvelteComponent } from 'svelte' |
| 16 | + import { TransitionaryComponentType } from 'svelte/transitionary'; |
| 17 | + const Comp: TransitionaryComponentType; |
15 | 18 | type Comp = SvelteComponent;
|
16 | 19 | export default Comp;
|
17 | 20 | }
|
|
0 commit comments