1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-30 16:40:57 -05:00
denoland-deno/cli/tests/testdata/lsp/code_action_response_imports.json
Bartek Iwańczuk 4a1a6b7985
fix(lsp): "Add all missing imports" uses correct specifiers (#17216)
This commit fixes "Add all missing imports" quick fix; before
it was replacing all occurrences with the same specifier. Now
every line returned from TSC is processed individually.
2023-01-05 13:05:49 +01:00

122 lines
2.5 KiB
JSON

[
{
"title": "Add import from \"./file02.ts\"",
"kind": "quickfix",
"diagnostics": [
{
"range": {
"start": {
"line": 0,
"character": 50
},
"end": {
"line": 0,
"character": 67
}
},
"severity": 1,
"code": 2304,
"source": "deno-ts",
"message": "Cannot find name 'DuckConfigOptions'."
}
],
"edit": {
"documentChanges": [
{
"textDocument": {
"uri": "file:///a/file00.ts",
"version": 1
},
"edits": [
{
"range": {
"start": {
"line": 0,
"character": 0
},
"end": {
"line": 0,
"character": 0
}
},
"newText": "import { DuckConfigOptions } from \"./file02.ts\";\n\n"
}
]
}
]
}
},
{
"title": "Add all missing imports",
"kind": "quickfix",
"diagnostics": [
{
"range": {
"start": {
"line": 0,
"character": 50
},
"end": {
"line": 0,
"character": 67
}
},
"severity": 1,
"code": 2304,
"source": "deno-ts",
"message": "Cannot find name 'DuckConfigOptions'."
}
],
"data": {
"specifier": "file:///a/file00.ts",
"fixId": "fixMissingImport"
}
},
{
"title": "Add import from \"./file01.ts\"",
"kind": "quickfix",
"diagnostics": [
{
"range": {
"start": {
"line": 4,
"character": 39
},
"end": {
"line": 4,
"character": 49
}
},
"severity": 1,
"code": 2304,
"source": "deno-ts",
"message": "Cannot find name 'DuckConfig'."
}
],
"edit": {
"documentChanges": [
{
"textDocument": {
"uri": "file:///a/file00.ts",
"version": 1
},
"edits": [
{
"range": {
"start": {
"line": 0,
"character": 0
},
"end": {
"line": 0,
"character": 0
}
},
"newText": "import { DuckConfig } from \"./file01.ts\";\n\n"
}
]
}
]
}
}
]