Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"lint": "prettier --check ."
},
"dependencies": {
"typescript": "^5.2.2"
"typescript": "^5.3.2"
},
"devDependencies": {
"cross-env": "^7.0.2",
Expand Down
8 changes: 4 additions & 4 deletions packages/language-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
},
"dependencies": {
"@jridgewell/trace-mapping": "^0.3.17",
"@vscode/emmet-helper": "2.8.4",
"@vscode/emmet-helper": "2.9.2",
"chokidar": "^3.4.1",
"estree-walker": "^2.0.1",
"fast-glob": "^3.2.7",
Expand All @@ -57,9 +57,9 @@
"svelte": "^3.57.0",
"svelte-preprocess": "~5.1.0",
"svelte2tsx": "workspace:~",
"typescript": "^5.2.2",
"vscode-css-languageservice": "~6.2.0",
"vscode-html-languageservice": "~5.0.0",
"typescript": "^5.3.2",
"vscode-css-languageservice": "~6.2.10",
"vscode-html-languageservice": "~5.1.1",
"vscode-languageserver": "8.0.2",
"vscode-languageserver-protocol": "3.17.2",
"vscode-languageserver-types": "3.17.2",
Expand Down
5 changes: 5 additions & 0 deletions packages/language-server/src/ls-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ export interface TsUserPreferencesConfig {
* only in typescript config
*/
includePackageJsonAutoImports?: ts.UserPreferences['includePackageJsonAutoImports'];

preferTypeOnlyAutoImports?: ts.UserPreferences['preferTypeOnlyAutoImports'];
}

/**
Expand Down Expand Up @@ -436,6 +438,8 @@ export class LSConfigManager {
config.suggest?.classMemberSnippets?.enabled ?? true,
includeCompletionsWithObjectLiteralMethodSnippets:
config.suggest?.objectLiteralMethodSnippets?.enabled ?? true,
preferTypeOnlyAutoImports: config.preferences?.preferTypeOnlyAutoImports,

includeInlayEnumMemberValueHints: inlayHints?.enumMemberValues?.enabled,
includeInlayFunctionLikeReturnTypeHints: inlayHints?.functionLikeReturnTypes?.enabled,
includeInlayParameterNameHints: inlayHints?.parameterNames?.enabled,
Expand All @@ -446,6 +450,7 @@ export class LSConfigManager {
includeInlayPropertyDeclarationTypeHints: inlayHints?.propertyDeclarationTypes?.enabled,
includeInlayVariableTypeHintsWhenTypeMatchesName:
inlayHints?.variableTypes?.suppressWhenTypeMatchesName === false,

interactiveInlayHints: true
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
},
"severity": 1,
"source": "ts",
"message": "Type '{ exported1: string; exported2: string; invalidProp: true; }' is not assignable to type '$$Props'.\n Object literal may only specify known properties, and '\"invalidProp\"' does not exist in type '$$Props'.",
"code": 2322,
"message": "Object literal may only specify known properties, and '\"invalidProp\"' does not exist in type '$$Props'.",
"code": 2353,
"tags": []
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
},
"severity": 1,
"source": "ts",
"message": "Argument of type '{ valid1: true; invalidProp1: boolean; }' is not assignable to parameter of type '{ valid1: boolean; validPropWrongType1: string; }'.\n Object literal may only specify known properties, and '\"invalidProp1\"' does not exist in type '{ valid1: boolean; validPropWrongType1: string; }'.",
"code": 2345,
"message": "Object literal may only specify known properties, and '\"invalidProp1\"' does not exist in type '{ valid1: boolean; validPropWrongType1: string; }'.",
"code": 2353,
"tags": []
},
{
Expand All @@ -39,8 +39,8 @@
},
"severity": 1,
"source": "ts",
"message": "Argument of type '{ valid2: true; invalidProp2: boolean; }' is not assignable to parameter of type '{ valid2: boolean; validPropWrongType2: string; }'.\n Object literal may only specify known properties, and '\"invalidProp2\"' does not exist in type '{ valid2: boolean; validPropWrongType2: string; }'.",
"code": 2345,
"message": "Object literal may only specify known properties, and '\"invalidProp2\"' does not exist in type '{ valid2: boolean; validPropWrongType2: string; }'.",
"code": 2353,
"tags": []
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"range": { "start": { "line": 8, "character": 57 }, "end": { "line": 8, "character": 68 } },
"severity": 1,
"source": "js",
"message": "Type '{ required: string; optional1: string; optional2: string; doesntExist: true; }' is not assignable to type '{ required: string; optional1?: string; optional2?: string; }'.\n Object literal may only specify known properties, and '\"doesntExist\"' does not exist in type '{ required: string; optional1?: string; optional2?: string; }'.",
"code": 2322,
"message": "Object literal may only specify known properties, and '\"doesntExist\"' does not exist in type '{ required: string; optional1?: string; optional2?: string; }'.",
"code": 2353,
"tags": []
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"range": { "start": { "line": 8, "character": 57 }, "end": { "line": 8, "character": 68 } },
"severity": 1,
"source": "ts",
"message": "Type '{ required: string; optional1: string; optional2: string; doesntExist: true; }' is not assignable to type '{ required: string; optional1?: string; optional2?: string; }'.\n Object literal may only specify known properties, and '\"doesntExist\"' does not exist in type '{ required: string; optional1?: string; optional2?: string; }'.",
"code": 2322,
"message": "Object literal may only specify known properties, and '\"doesntExist\"' does not exist in type '{ required: string; optional1?: string; optional2?: string; }'.",
"code": 2353,
"tags": []
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"range": { "start": { "line": 8, "character": 57 }, "end": { "line": 8, "character": 68 } },
"severity": 1,
"source": "js",
"message": "Type '{ required: string; optional1: string; optional2: string; doesntExist: true; }' is not assignable to type '{ required: string; optional1?: string | undefined; optional2?: string | undefined; }'.\n Object literal may only specify known properties, and '\"doesntExist\"' does not exist in type '{ required: string; optional1?: string | undefined; optional2?: string | undefined; }'.",
"code": 2322,
"message": "Object literal may only specify known properties, and '\"doesntExist\"' does not exist in type '{ required: string; optional1?: string | undefined; optional2?: string | undefined; }'.",
"code": 2353,
"tags": []
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"range": { "start": { "line": 8, "character": 57 }, "end": { "line": 8, "character": 68 } },
"severity": 1,
"source": "ts",
"message": "Type '{ required: string; optional1: string; optional2: string; doesntExist: true; }' is not assignable to type '{ required: string; optional1?: string | undefined; optional2?: string | undefined; }'.\n Object literal may only specify known properties, and '\"doesntExist\"' does not exist in type '{ required: string; optional1?: string | undefined; optional2?: string | undefined; }'.",
"code": 2322,
"message": "Object literal may only specify known properties, and '\"doesntExist\"' does not exist in type '{ required: string; optional1?: string | undefined; optional2?: string | undefined; }'.",
"code": 2353,
"tags": []
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@
"range": { "start": { "line": 3, "character": 5 }, "end": { "line": 3, "character": 19 } },
"severity": 1,
"source": "ts",
"message": "Argument of type '{ owntypefromold: string; }' is not assignable to parameter of type 'HTMLProps<\"div\", HTMLAttributes<any>>'.\n Object literal may only specify known properties, and '\"owntypefromold\"' does not exist in type 'HTMLProps<\"div\", HTMLAttributes<any>>'.",
"code": 2345,
"message": "Object literal may only specify known properties, and '\"owntypefromold\"' does not exist in type 'HTMLProps<\"div\", HTMLAttributes<any>>'.",
"code": 2353,
"tags": []
},
{
"range": { "start": { "line": 4, "character": 8 }, "end": { "line": 4, "character": 23 } },
"severity": 1,
"source": "ts",
"message": "Argument of type '{ \"on:ownclickfromold\": (e: any) => any; }' is not assignable to parameter of type 'HTMLProps<\"div\", HTMLAttributes<any>>'.\n Object literal may only specify known properties, and '\"on:ownclickfromold\"' does not exist in type 'HTMLProps<\"div\", HTMLAttributes<any>>'.",
"code": 2345,
"message": "Object literal may only specify known properties, and '\"on:ownclickfromold\"' does not exist in type 'HTMLProps<\"div\", HTMLAttributes<any>>'.",
"code": 2353,
"tags": []
},
{
Expand All @@ -52,8 +52,8 @@
},
"severity": 1,
"source": "ts",
"message": "Argument of type '{ doesnexist: string; }' is not assignable to parameter of type '{ attribute?: string; }'.\n Object literal may only specify known properties, and '\"doesnexist\"' does not exist in type '{ attribute?: string; }'.",
"code": 2345,
"message": "Object literal may only specify known properties, and '\"doesnexist\"' does not exist in type '{ attribute?: string; }'.",
"code": 2353,
"tags": []
},
{
Expand All @@ -74,8 +74,8 @@
},
"severity": 1,
"source": "ts",
"message": "Argument of type '{ owntypefromold: boolean; }' is not assignable to parameter of type 'HTMLProps<\"div\", HTMLAttributes<any>>'.\n Object literal may only specify known properties, and '\"owntypefromold\"' does not exist in type 'HTMLProps<\"div\", HTMLAttributes<any>>'.",
"code": 2345,
"message": "Object literal may only specify known properties, and '\"owntypefromold\"' does not exist in type 'HTMLProps<\"div\", HTMLAttributes<any>>'.",
"code": 2353,
"tags": []
},
{
Expand All @@ -96,8 +96,8 @@
},
"severity": 1,
"source": "ts",
"message": "Argument of type '{ \"on:ownclickfromold\": (e: any) => any; }' is not assignable to parameter of type 'HTMLProps<\"div\", HTMLAttributes<any>>'.\n Object literal may only specify known properties, and '\"on:ownclickfromold\"' does not exist in type 'HTMLProps<\"div\", HTMLAttributes<any>>'.",
"code": 2345,
"message": "Object literal may only specify known properties, and '\"on:ownclickfromold\"' does not exist in type 'HTMLProps<\"div\", HTMLAttributes<any>>'.",
"code": 2353,
"tags": []
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
},
"severity": 1,
"source": "ts",
"message": "Argument of type '{ doesnexist: string; }' is not assignable to parameter of type '{ attribute?: string; }'.\n Object literal may only specify known properties, and '\"doesnexist\"' does not exist in type '{ attribute?: string; }'.",
"code": 2345,
"message": "Object literal may only specify known properties, and '\"doesnexist\"' does not exist in type '{ attribute?: string; }'.",
"code": 2353,
"tags": []
},
{
Expand Down Expand Up @@ -83,8 +83,8 @@
},
"severity": 1,
"source": "ts",
"message": "Argument of type '{ doesnexist: string; }' is not assignable to parameter of type '{ attribute?: string; }'.\n Object literal may only specify known properties, and '\"doesnexist\"' does not exist in type '{ attribute?: string; }'.",
"code": 2345,
"message": "Object literal may only specify known properties, and '\"doesnexist\"' does not exist in type '{ attribute?: string; }'.",
"code": 2353,
"tags": []
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
"range": { "start": { "line": 9, "character": 5 }, "end": { "line": 9, "character": 12 } },
"severity": 1,
"source": "ts",
"message": "Argument of type '{ \"this-is\": string; }' is not assignable to parameter of type 'HTMLProps<\"div\", HTMLAttributes<any>>'.\n Object literal may only specify known properties, and '\"this-is\"' does not exist in type 'HTMLProps<\"div\", HTMLAttributes<any>>'.",
"code": 2345,
"message": "Object literal may only specify known properties, and '\"this-is\"' does not exist in type 'HTMLProps<\"div\", HTMLAttributes<any>>'.",
"code": 2353,
"tags": []
},
{
"range": { "start": { "line": 10, "character": 6 }, "end": { "line": 10, "character": 9 } },
"severity": 1,
"source": "ts",
"message": "Argument of type '{ bar: string; }' is not assignable to parameter of type 'HTMLProps<\"div\", HTMLAttributes<any>>'.\n Object literal may only specify known properties, and 'bar' does not exist in type 'HTMLProps<\"div\", HTMLAttributes<any>>'.",
"code": 2345,
"message": "Object literal may only specify known properties, and 'bar' does not exist in type 'HTMLProps<\"div\", HTMLAttributes<any>>'.",
"code": 2353,
"tags": []
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
},
"severity": 1,
"source": "ts",
"message": "Argument of type '{ \"on:wat\": () => string; }' is not assignable to parameter of type 'HTMLProps<\"div\", HTMLAttributes<any>>'.\n Object literal may only specify known properties, and '\"on:wat\"' does not exist in type 'HTMLProps<\"div\", HTMLAttributes<any>>'.",
"code": 2345,
"message": "Object literal may only specify known properties, and '\"on:wat\"' does not exist in type 'HTMLProps<\"div\", HTMLAttributes<any>>'.",
"code": 2353,
"tags": []
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"range": { "start": { "line": 5, "character": 22 }, "end": { "line": 5, "character": 29 } },
"severity": 1,
"source": "ts",
"message": "Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './bar.js'?",
"message": "Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './bar.js'?",
"code": 2835,
"tags": []
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
},
"severity": 1,
"source": "ts",
"message": "Argument of type '{ cellpadding: number; }' is not assignable to parameter of type 'HTMLProps<\"div\", HTMLAttributes<any>>'.\n Object literal may only specify known properties, and '\"cellpadding\"' does not exist in type 'HTMLProps<\"div\", HTMLAttributes<any>>'.",
"code": 2345,
"message": "Object literal may only specify known properties, and '\"cellpadding\"' does not exist in type 'HTMLProps<\"div\", HTMLAttributes<any>>'.",
"code": 2353,
"tags": []
}
]
Original file line number Diff line number Diff line change
@@ -1,28 +1,19 @@
[
{
"label": ": any",
"position": {
"line": 1,
"character": 23
},
"label": [{ "value": ": " }, { "value": "any" }],
"position": { "line": 1, "character": 23 },
"kind": 1,
"paddingLeft": true
},
{
"label": ": any",
"position": {
"line": 1,
"character": 26
},
"label": [{ "value": ": " }, { "value": "any" }],
"position": { "line": 1, "character": 26 },
"kind": 1,
"paddingLeft": true
},
{
"label": ": void",
"position": {
"line": 1,
"character": 27
},
"label": [{ "value": ": " }, { "value": "void" }],
"position": { "line": 1, "character": 27 },
"kind": 1,
"paddingLeft": true
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
[
{
"label": ": { id: number; }[]",
"position": {
"line": 3,
"character": 13
},
"label": [
{ "value": ": " },
{ "value": "{" },
{ "value": " " },
{ "value": "id" },
{ "value": ": " },
{ "value": "number" },
{ "value": " " },
{ "value": "}" },
{ "value": "[]" }
],
"position": { "line": 3, "character": 13 },
"kind": 1,
"paddingLeft": true
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
[
{
"label": ": void",
"label": [{ "value": ": " }, { "value": "void" }],
"position": { "line": 5, "character": 30 },
"kind": 1,
"paddingLeft": true
},
{
"label": ": MouseEvent",
"label": [
{ "value": ": " },
{
"value": "MouseEvent",
"location": {
"range": {
"start": { "line": 15586, "character": 10 },
"end": { "line": 15586, "character": 20 }
},
"uri": "<node_modules>/typescript/lib/lib.dom.d.ts"
}
}
],
"position": { "line": 9, "character": 22 },
"kind": 1,
"paddingLeft": true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[
{
"label": ": void",
"label": [{ "value": ": " }, { "value": "void" }],
"position": { "line": 1, "character": 33 },
"kind": 1,
"paddingLeft": true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[
{
"label": ": number",
"label": [{ "value": ": " }, { "value": "number" }],
"position": { "line": 1, "character": 14 },
"kind": 1,
"paddingLeft": true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[
{
"label": ": number[]",
"label": [{ "value": ": " }, { "value": "number" }, { "value": "[]" }],
"position": { "line": 1, "character": 11 },
"kind": 1,
"paddingLeft": true
},
{
"label": ": number",
"label": [{ "value": ": " }, { "value": "number" }],
"position": { "line": 4, "character": 23 },
"kind": 1,
"paddingLeft": true
Expand Down
Loading