1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-29 02:29:06 -05:00
denoland-deno/cli/tests/testdata/lsp/code_action_response_imports.json
Bartek Iwańczuk ef5f8cd265
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.
2022-12-29 21:07:09 +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"
}
]
}
]
}
}
]