svelte2tsx 0.5.19 → 0.5.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/svelte-jsx.d.ts +7 -0
- package/svelte-shims.d.ts +2 -2
package/package.json
CHANGED
package/svelte-jsx.d.ts
CHANGED
|
@@ -67,6 +67,7 @@ declare namespace svelteHTML {
|
|
|
67
67
|
// over those manually defined in the old, taking precendence over the defaults, to make sth like this possible
|
|
68
68
|
// https://github.com/sveltejs/language-tools/issues/1352#issuecomment-1248627516
|
|
69
69
|
Omit<
|
|
70
|
+
// TODO once old transformation is out and JSX.IntrinsicElements is empty, we need an additional "does this Property exist on JSX.IntrinsicElements" check
|
|
70
71
|
Omit<import('./svelte-html-do-not-use').SvelteHTMLElements[Property], keyof EventsWithColon<svelte.JSX.IntrinsicElements[Property & string]>> & EventsWithColon<svelte.JSX.IntrinsicElements[Property & string]>,
|
|
71
72
|
keyof Override
|
|
72
73
|
> & Override;
|
|
@@ -1397,6 +1398,12 @@ declare namespace svelte.JSX {
|
|
|
1397
1398
|
svelteoptions: { [name: string]: any };
|
|
1398
1399
|
sveltehead: { [name: string]: any };
|
|
1399
1400
|
svelteelement: { 'this': string | undefined | null; } & HTMLProps<any> & SVGProps<any> & SapperAnchorProps & SvelteKitAnchorProps;
|
|
1401
|
+
// Needed due to backwards compatibility type which hits these
|
|
1402
|
+
'svelte:window': HTMLProps<Window> & SvelteWindowProps;
|
|
1403
|
+
'svelte:body': HTMLProps<HTMLElement>;
|
|
1404
|
+
'svelte:fragment': { slot?: string; };
|
|
1405
|
+
'svelte:options': { [name: string]: any };
|
|
1406
|
+
'svelte:head': { [name: string]: any };
|
|
1400
1407
|
|
|
1401
1408
|
[name: string]: { [name: string]: any };
|
|
1402
1409
|
}
|
package/svelte-shims.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ declare class Svelte2TsxComponent<
|
|
|
36
36
|
* Causes the callback function to be called whenever the component dispatches an event.
|
|
37
37
|
* A function is returned that will remove the event listener when called.
|
|
38
38
|
*/
|
|
39
|
-
$on<K extends keyof Events & string>(event: K, handler: (e: Events[K]) => any): () => void;
|
|
39
|
+
$on<K extends keyof Events & string>(event: K, handler: ((e: Events[K]) => any) | null | undefined): () => void;
|
|
40
40
|
/**
|
|
41
41
|
* Removes a component from the DOM and triggers any `onDestroy` handlers.
|
|
42
42
|
*/
|
|
@@ -292,7 +292,7 @@ declare type ATypedSvelteComponent = {
|
|
|
292
292
|
*/
|
|
293
293
|
$$slot_def: any;
|
|
294
294
|
|
|
295
|
-
$on(event: string, handler: (e: any) => any): () => void;
|
|
295
|
+
$on(event: string, handler: ((e: any) => any) | null | undefined): () => void;
|
|
296
296
|
}
|
|
297
297
|
/**
|
|
298
298
|
* Ambient type only used for intellisense, DO NOT USE IN YOUR PROJECT
|