Skip to content

Commit 6c66680

Browse files
chore: bump typescript to 5.5 (#12126)
* chore: bump typescript to 5.5 * try to revert non-typescript-related changes to lockfile --------- Co-authored-by: Conduitry <[email protected]>
1 parent 3da2646 commit 6c66680

File tree

6 files changed

+126
-130
lines changed

6 files changed

+126
-130
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"playwright": "^1.41.1",
4343
"prettier": "^3.2.4",
4444
"prettier-plugin-svelte": "^3.1.2",
45-
"typescript": "^5.3.3",
45+
"typescript": "^5.5.2",
4646
"typescript-eslint": "^8.0.0-alpha.20",
4747
"v8-natives": "^1.2.5",
4848
"vitest": "^1.2.1"

packages/svelte/types/index.d.ts

+36-36
Original file line numberDiff line numberDiff line change
@@ -350,39 +350,39 @@ declare module 'svelte' {
350350
* Mounts a component to the given target and returns the exports and potentially the props (if compiled with `accessors: true`) of the component
351351
*
352352
* */
353-
export function mount<Props extends Record<string, any>, Exports extends Record<string, any>>(component: ComponentType<SvelteComponent<Props, any, any>> | Component<Props, Exports, any>, options: {} extends Props ? {
353+
export function mount<Props extends Record<string, any>, Exports extends Record<string, any>>(component: ComponentType<SvelteComponent<Props>> | Component<Props, Exports, any>, options: {} extends Props ? {
354354
target: Document | Element | ShadowRoot;
355-
anchor?: Node | undefined;
356-
props?: Props | undefined;
357-
events?: Record<string, (e: any) => any> | undefined;
358-
context?: Map<any, any> | undefined;
359-
intro?: boolean | undefined;
355+
anchor?: Node;
356+
props?: Props;
357+
events?: Record<string, (e: any) => any>;
358+
context?: Map<any, any>;
359+
intro?: boolean;
360360
} : {
361361
target: Document | Element | ShadowRoot;
362362
props: Props;
363-
anchor?: Node | undefined;
364-
events?: Record<string, (e: any) => any> | undefined;
365-
context?: Map<any, any> | undefined;
366-
intro?: boolean | undefined;
363+
anchor?: Node;
364+
events?: Record<string, (e: any) => any>;
365+
context?: Map<any, any>;
366+
intro?: boolean;
367367
}): Exports;
368368
/**
369369
* Hydrates a component on the given target and returns the exports and potentially the props (if compiled with `accessors: true`) of the component
370370
*
371371
* */
372-
export function hydrate<Props extends Record<string, any>, Exports extends Record<string, any>>(component: ComponentType<SvelteComponent<Props, any, any>> | Component<Props, Exports, any>, options: {} extends Props ? {
372+
export function hydrate<Props extends Record<string, any>, Exports extends Record<string, any>>(component: ComponentType<SvelteComponent<Props>> | Component<Props, Exports, any>, options: {} extends Props ? {
373373
target: Document | Element | ShadowRoot;
374-
props?: Props | undefined;
375-
events?: Record<string, (e: any) => any> | undefined;
376-
context?: Map<any, any> | undefined;
377-
intro?: boolean | undefined;
378-
recover?: boolean | undefined;
374+
props?: Props;
375+
events?: Record<string, (e: any) => any>;
376+
context?: Map<any, any>;
377+
intro?: boolean;
378+
recover?: boolean;
379379
} : {
380380
target: Document | Element | ShadowRoot;
381381
props: Props;
382-
events?: Record<string, (e: any) => any> | undefined;
383-
context?: Map<any, any> | undefined;
384-
intro?: boolean | undefined;
385-
recover?: boolean | undefined;
382+
events?: Record<string, (e: any) => any>;
383+
context?: Map<any, any>;
384+
intro?: boolean;
385+
recover?: boolean;
386386
}): Exports;
387387
/**
388388
* Unmounts a component that was previously mounted using `mount` or `hydrate`.
@@ -576,8 +576,8 @@ declare module 'svelte/compiler' {
576576
* https://svelte.dev/docs/svelte-compiler#svelte-parse
577577
* */
578578
export function parse(source: string, options?: {
579-
filename?: string | undefined;
580-
modern?: false | undefined;
579+
filename?: string;
580+
modern?: false;
581581
} | undefined): LegacyRoot;
582582
/**
583583
* @deprecated Replace this with `import { walk } from 'estree-walker'`
@@ -1108,18 +1108,18 @@ declare module 'svelte/compiler' {
11081108
* https://svelte.dev/docs/svelte-compiler#svelte-preprocess
11091109
* */
11101110
export function preprocess(source: string, preprocessor: PreprocessorGroup | PreprocessorGroup[], options?: {
1111-
filename?: string | undefined;
1111+
filename?: string;
11121112
} | undefined): Promise<Processed>;
11131113
export class CompileError extends Error {
11141114

11151115
constructor(code: string, message: string, position: [number, number] | undefined);
11161116
filename: string | undefined;
11171117

1118-
position: CompileError_1['position'];
1118+
position: CompileError_1["position"];
11191119

1120-
start: CompileError_1['start'];
1120+
start: CompileError_1["start"];
11211121

1122-
end: CompileError_1['end'];
1122+
end: CompileError_1["end"];
11231123
code: string;
11241124
}
11251125
/**
@@ -1153,13 +1153,13 @@ declare module 'svelte/compiler' {
11531153
/**
11541154
* A map of declarators to the bindings they declare
11551155
* */
1156-
declarators: Map<import('estree').VariableDeclarator | LetDirective, Binding[]>;
1156+
declarators: Map<import("estree").VariableDeclarator | LetDirective, Binding[]>;
11571157
/**
11581158
* A set of all the names referenced with this scope
11591159
* — useful for generating unique names
11601160
* */
11611161
references: Map<string, {
1162-
node: import('estree').Identifier;
1162+
node: import("estree").Identifier;
11631163
path: SvelteNode[];
11641164
}[]>;
11651165
/**
@@ -1168,18 +1168,18 @@ declare module 'svelte/compiler' {
11681168
*/
11691169
function_depth: number;
11701170

1171-
declare(node: import('estree').Identifier, kind: Binding['kind'], declaration_kind: DeclarationKind, initial?: null | import('estree').Expression | import('estree').FunctionDeclaration | import('estree').ClassDeclaration | import('estree').ImportDeclaration | EachBlock): Binding;
1171+
declare(node: import("estree").Identifier, kind: Binding["kind"], declaration_kind: DeclarationKind, initial?: null | import("estree").Expression | import("estree").FunctionDeclaration | import("estree").ClassDeclaration | import("estree").ImportDeclaration | EachBlock): Binding;
11721172
child(porous?: boolean): Scope;
11731173

11741174
generate(preferred_name: string): string;
11751175

11761176
get(name: string): Binding | null;
11771177

1178-
get_bindings(node: import('estree').VariableDeclarator | LetDirective): Binding[];
1178+
get_bindings(node: import("estree").VariableDeclarator | LetDirective): Binding[];
11791179

11801180
owner(name: string): Scope | null;
11811181

1182-
reference(node: import('estree').Identifier, path: SvelteNode[]): void;
1182+
reference(node: import("estree").Identifier, path: SvelteNode[]): void;
11831183
#private;
11841184
}
11851185
class ScopeRoot {
@@ -2006,18 +2006,18 @@ declare module 'svelte/legacy' {
20062006
*
20072007
* */
20082008
export function createClassComponent<Props extends Record<string, any>, Exports extends Record<string, any>, Events extends Record<string, any>, Slots extends Record<string, any>>(options: import("svelte").ComponentConstructorOptions<Props> & {
2009-
component: import("svelte").ComponentType<import("svelte").SvelteComponent<Props, Events, Slots>> | import("svelte").Component<Props, any, string>;
2010-
immutable?: boolean | undefined;
2011-
hydrate?: boolean | undefined;
2012-
recover?: boolean | undefined;
2009+
component: import("svelte").ComponentType<import("svelte").SvelteComponent<Props, Events, Slots>> | import("svelte").Component<Props>;
2010+
immutable?: boolean;
2011+
hydrate?: boolean;
2012+
recover?: boolean;
20132013
}): import("svelte").SvelteComponent<Props, Events, Slots> & Exports;
20142014
/**
20152015
* Takes the component function and returns a Svelte 4 compatible component constructor.
20162016
*
20172017
* @deprecated Use this only as a temporary solution to migrate your imperative component code to Svelte 5.
20182018
*
20192019
* */
2020-
export function asClassComponent<Props extends Record<string, any>, Exports extends Record<string, any>, Events extends Record<string, any>, Slots extends Record<string, any>>(component: import("svelte").SvelteComponent<Props, Events, Slots> | import("svelte").Component<Props, any, string>): import("svelte").ComponentType<import("svelte").SvelteComponent<Props, Events, Slots> & Exports>;
2020+
export function asClassComponent<Props extends Record<string, any>, Exports extends Record<string, any>, Events extends Record<string, any>, Slots extends Record<string, any>>(component: import("svelte").SvelteComponent<Props, Events, Slots> | import("svelte").Component<Props>): import("svelte").ComponentType<import("svelte").SvelteComponent<Props, Events, Slots> & Exports>;
20212021
/**
20222022
* Runs the given function once immediately on the server, and works like `$effect.pre` on the client.
20232023
*

0 commit comments

Comments
 (0)