🤖 Pick PR #59542 (Fixing delay caused in vscode due t...) into release-5.6 (#59695)

Co-authored-by: navya9singh <108360753+navya9singh@users.noreply.github.com>
This commit is contained in:
TypeScript Bot
2024-08-19 22:19:09 -07:00
committed by GitHub
parent e6914a5587
commit bbb5faf7e7
29 changed files with 3260 additions and 49 deletions
+49 -12
View File
@@ -3,12 +3,17 @@ import {
codefix,
Debug,
fileShouldUseJavaScriptRequire,
findAncestor,
findIndex,
forEachChild,
formatting,
getNewLineOrDefaultFromHost,
getQuotePreference,
getTokenAtPosition,
isIdentifier,
Program,
rangeContainsPosition,
rangeContainsRange,
SourceFile,
Statement,
SymbolFlags,
@@ -56,17 +61,16 @@ function pasteEdits(
cancellationToken: CancellationToken,
changes: textChanges.ChangeTracker,
) {
let actualPastedText: string[] | undefined;
let actualPastedText: string | undefined;
if (pastedText.length !== pasteLocations.length) {
actualPastedText = pastedText.length === 1 ? pastedText : [pastedText.join("\n")];
actualPastedText = pastedText.length === 1 ? pastedText[0] : pastedText.join(getNewLineOrDefaultFromHost(formatContext.host, formatContext.options));
}
const statements: Statement[] = [];
let newText = targetFile.text;
for (let i = pasteLocations.length - 1; i >= 0; i--) {
const { pos, end } = pasteLocations[i];
newText = actualPastedText ? newText.slice(0, pos) + actualPastedText[0] + newText.slice(end) : newText.slice(0, pos) + pastedText[i] + newText.slice(end);
newText = actualPastedText ? newText.slice(0, pos) + actualPastedText + newText.slice(end) : newText.slice(0, pos) + pastedText[i] + newText.slice(end);
}
let importAdder: codefix.ImportAdder;
@@ -104,12 +108,46 @@ function pasteEdits(
preferences,
formatContext,
};
forEachChild(updatedFile, function cb(node) {
if (isIdentifier(node) && !originalProgram?.getTypeChecker().resolveName(node.text, node, SymbolFlags.All, /*excludeGlobals*/ false)) {
// generate imports
importAdder.addImportForUnresolvedIdentifier(context, node, /*useAutoImportProvider*/ true);
}
node.forEachChild(cb);
// `updatedRanges` represent the new ranges that account for the offset changes caused by pasting new text and
// `offset` represents by how much the starting position of `pasteLocations` needs to be changed.
//
// We iterate over each updated range to get the node that wholly encloses the updated range.
// For each child of that node, we checked for unresolved identifiers
// within the updated range and try importing it.
let offset = 0;
pasteLocations.forEach((location, i) => {
const oldTextLength = location.end - location.pos;
const textToBePasted = actualPastedText ?? pastedText[i];
const startPos = location.pos + offset;
const endPos = startPos + textToBePasted.length;
const range: TextRange = { pos: startPos, end: endPos };
offset += textToBePasted.length - oldTextLength;
const enclosingNode = findAncestor(
getTokenAtPosition(context.sourceFile, range.pos),
ancestorNode => rangeContainsRange(ancestorNode, range),
);
if (!enclosingNode) return;
forEachChild(enclosingNode, function importUnresolvedIdentifiers(node) {
const isImportCandidate = isIdentifier(node) &&
rangeContainsPosition(range, node.getStart(updatedFile)) &&
!updatedProgram?.getTypeChecker().resolveName(
node.text,
node,
SymbolFlags.All,
/*excludeGlobals*/ false,
);
if (isImportCandidate) {
return importAdder.addImportForUnresolvedIdentifier(
context,
node,
/*useAutoImportProvider*/ true,
);
}
node.forEachChild(importUnresolvedIdentifiers);
});
});
}
importAdder.writeFixes(changes, getQuotePreference(copiedFrom ? copiedFrom.file : targetFile, preferences));
@@ -125,8 +163,7 @@ function pasteEdits(
changes.replaceRangeWithText(
targetFile,
{ pos: paste.pos, end: paste.end },
actualPastedText ?
actualPastedText[0] : pastedText[i],
actualPastedText ?? pastedText[i],
);
});
}
@@ -0,0 +1,396 @@
currentDirectory:: / useCaseSensitiveFileNames: false
Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist
//// [/a.ts]
function foo() {
const p = 1;
console.log("yes");
}
class bar {
constructor() {
function a() {
console.log("have a good day");
}
a();
function b() {
function c() {
const test = 1 + 2 + 3;
}
}
b();
}
c() {
console.log("hello again");
function k() {
const happy = banana + avocados;
}
}
}
//// [/b.ts]
export const juice = 1;
export const sauce = 2;
export const fig = 3;
export const tomato = 4;
//// [/lib.d.ts]
lib.d.ts-Text
//// [/lib.decorators.d.ts]
lib.decorators.d.ts-Text
//// [/lib.decorators.legacy.d.ts]
lib.decorators.legacy.d.ts-Text
//// [/tsconfig.json]
{ "files": ["a.ts", "b.ts"] }
Info seq [hh:mm:ss:mss] request:
{
"seq": 0,
"type": "request",
"arguments": {
"file": "/a.ts"
},
"command": "open"
}
Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /a.ts ProjectRootPath: undefined:: Result: /tsconfig.json
Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file
Info seq [hh:mm:ss:mss] event:
{
"seq": 0,
"type": "event",
"event": "projectLoadingStart",
"body": {
"projectName": "/tsconfig.json",
"reason": "Creating possible configured project for /a.ts to open"
}
}
Info seq [hh:mm:ss:mss] Config: /tsconfig.json : {
"rootNames": [
"/a.ts",
"/b.ts"
],
"options": {
"configFilePath": "/tsconfig.json"
}
}
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /b.ts 500 undefined WatchType: Closed Script info
Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info
Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured)
Info seq [hh:mm:ss:mss] Files (5)
/lib.d.ts Text-1 lib.d.ts-Text
/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
/a.ts SVC-1-0 "function foo() {\n const p = 1;\n console.log(\"yes\");\n}\nclass bar {\n constructor() {\n function a() {\n console.log(\"have a good day\");\n }\n a();\n function b() {\n function c() {\n const test = 1 + 2 + 3;\n } \n }\n b();\n }\n c() {\n console.log(\"hello again\");\n function k() {\n const happy = banana + avocados;\n }\n }\n}"
/b.ts Text-1 "export const juice = 1;\nexport const sauce = 2;\nexport const fig = 3;\nexport const tomato = 4;"
lib.d.ts
Default library for target 'es5'
lib.decorators.d.ts
Library referenced via 'decorators' from file 'lib.d.ts'
lib.decorators.legacy.d.ts
Library referenced via 'decorators.legacy' from file 'lib.d.ts'
a.ts
Part of 'files' list in tsconfig.json
b.ts
Part of 'files' list in tsconfig.json
Info seq [hh:mm:ss:mss] -----------------------------------------------
Info seq [hh:mm:ss:mss] event:
{
"seq": 0,
"type": "event",
"event": "projectLoadingFinish",
"body": {
"projectName": "/tsconfig.json"
}
}
Info seq [hh:mm:ss:mss] event:
{
"seq": 0,
"type": "event",
"event": "configFileDiag",
"body": {
"triggerFile": "/a.ts",
"configFile": "/tsconfig.json",
"diagnostics": []
}
}
Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured)
Info seq [hh:mm:ss:mss] Files (5)
Info seq [hh:mm:ss:mss] -----------------------------------------------
Info seq [hh:mm:ss:mss] Open files:
Info seq [hh:mm:ss:mss] FileName: /a.ts ProjectRootPath: undefined
Info seq [hh:mm:ss:mss] Projects: /tsconfig.json
Info seq [hh:mm:ss:mss] response:
{
"seq": 0,
"type": "response",
"command": "open",
"request_seq": 0,
"success": true,
"performanceData": {
"updateGraphDurationMs": *
}
}
After Request
watchedFiles::
/b.ts: *new*
{"pollingInterval":500}
/lib.d.ts: *new*
{"pollingInterval":500}
/lib.decorators.d.ts: *new*
{"pollingInterval":500}
/lib.decorators.legacy.d.ts: *new*
{"pollingInterval":500}
/tsconfig.json: *new*
{"pollingInterval":2000}
Projects::
/tsconfig.json (Configured) *new*
projectStateVersion: 1
projectProgramVersion: 1
ScriptInfos::
/a.ts (Open) *new*
version: SVC-1-0
containingProjects: 1
/tsconfig.json *default*
/b.ts *new*
version: Text-1
containingProjects: 1
/tsconfig.json
/lib.d.ts *new*
version: Text-1
containingProjects: 1
/tsconfig.json
/lib.decorators.d.ts *new*
version: Text-1
containingProjects: 1
/tsconfig.json
/lib.decorators.legacy.d.ts *new*
version: Text-1
containingProjects: 1
/tsconfig.json
Info seq [hh:mm:ss:mss] request:
{
"seq": 1,
"type": "request",
"arguments": {
"formatOptions": {
"indentSize": 4,
"tabSize": 4,
"newLineCharacter": "\n",
"convertTabsToSpaces": true,
"indentStyle": 2,
"insertSpaceAfterConstructor": false,
"insertSpaceAfterCommaDelimiter": true,
"insertSpaceAfterSemicolonInForStatements": true,
"insertSpaceBeforeAndAfterBinaryOperators": true,
"insertSpaceAfterKeywordsInControlFlowStatements": true,
"insertSpaceAfterFunctionKeywordForAnonymousFunctions": false,
"insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false,
"insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false,
"insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true,
"insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false,
"insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": false,
"insertSpaceBeforeFunctionParenthesis": false,
"placeOpenBraceOnNewLineForFunctions": false,
"placeOpenBraceOnNewLineForControlBlocks": false,
"semicolons": "ignore",
"trimTrailingWhitespace": true,
"indentSwitchCase": true
}
},
"command": "configure"
}
Info seq [hh:mm:ss:mss] Format host information updated
Info seq [hh:mm:ss:mss] response:
{
"seq": 0,
"type": "response",
"command": "configure",
"request_seq": 1,
"success": true
}
Info seq [hh:mm:ss:mss] request:
{
"seq": 2,
"type": "request",
"arguments": {
"file": "/a.ts",
"pastedText": [
"const t = 1 + juice + p;",
"function avacado() { return sauce; }",
"fig + kiwi",
"function k() {\n const cherry = 3 + tomato + cucumber;\n }"
],
"pasteLocations": [
{
"start": {
"line": 3,
"offset": 4
},
"end": {
"line": 3,
"offset": 23
}
},
{
"start": {
"line": 8,
"offset": 13
},
"end": {
"line": 8,
"offset": 44
}
},
{
"start": {
"line": 13,
"offset": 29
},
"end": {
"line": 13,
"offset": 34
}
},
{
"start": {
"line": 20,
"offset": 9
},
"end": {
"line": 22,
"offset": 10
}
}
]
},
"command": "getPasteEdits"
}
Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json
Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: false structureIsReused:: Completely Elapsed:: *ms
Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured)
Info seq [hh:mm:ss:mss] Files (5)
/lib.d.ts Text-1 lib.d.ts-Text
/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
/a.ts SVC-1-1 "function foo() {\n const p = 1;\n const t = 1 + juice + p;\n}\nclass bar {\n constructor() {\n function a() {\n function avacado() { return sauce; }\n }\n a();\n function b() {\n function c() {\n const test = fig + kiwi + 3;\n } \n }\n b();\n }\n c() {\n console.log(\"hello again\");\n function k() {\n const cherry = 3 + tomato + cucumber;\n }\n }\n}"
/b.ts Text-1 "export const juice = 1;\nexport const sauce = 2;\nexport const fig = 3;\nexport const tomato = 4;"
Info seq [hh:mm:ss:mss] -----------------------------------------------
Info seq [hh:mm:ss:mss] response:
{
"seq": 0,
"type": "response",
"command": "getPasteEdits",
"request_seq": 2,
"success": true,
"performanceData": {
"updateGraphDurationMs": *
},
"body": {
"edits": [
{
"fileName": "/a.ts",
"textChanges": [
{
"start": {
"line": 1,
"offset": 1
},
"end": {
"line": 1,
"offset": 1
},
"newText": "import { juice, sauce, fig, tomato } from \"./b\";\n\n"
},
{
"start": {
"line": 3,
"offset": 4
},
"end": {
"line": 3,
"offset": 23
},
"newText": "const t = 1 + juice + p;"
},
{
"start": {
"line": 8,
"offset": 13
},
"end": {
"line": 8,
"offset": 44
},
"newText": "function avacado() { return sauce; }"
},
{
"start": {
"line": 13,
"offset": 29
},
"end": {
"line": 13,
"offset": 34
},
"newText": "fig + kiwi"
},
{
"start": {
"line": 20,
"offset": 9
},
"end": {
"line": 22,
"offset": 10
},
"newText": "function k() {\n const cherry = 3 + tomato + cucumber;\n }"
}
]
}
],
"fixId": "providePostPasteEdits"
}
}
After Request
Projects::
/tsconfig.json (Configured) *changed*
projectStateVersion: 3 *changed*
projectProgramVersion: 1
dirty: true *changed*
ScriptInfos::
/a.ts (Open) *changed*
version: SVC-1-2 *changed*
containingProjects: 1
/tsconfig.json *default*
/b.ts
version: Text-1
containingProjects: 1
/tsconfig.json
/lib.d.ts
version: Text-1
containingProjects: 1
/tsconfig.json
/lib.decorators.d.ts
version: Text-1
containingProjects: 1
/tsconfig.json
/lib.decorators.legacy.d.ts
version: Text-1
containingProjects: 1
/tsconfig.json
@@ -0,0 +1,403 @@
currentDirectory:: / useCaseSensitiveFileNames: false
Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist
//// [/a.ts]
function foo() {
const p = 1;
function bar() {
console.log("Testing");
}
console.log("yes");
}
class bar {
constructor() {
function a() {
function aa() {
console.log("have a good day");
}
}
a();
function b() {
function c() {
export const testing = 1;
const test = 1 + testing + 3;
}
}
b();
}
c() {
console.log("hello again");
function k() {
const happy = banana + avocados;
}
}
}
//// [/b.ts]
export const juice = 1;
export const sauce = 2;
export const fig = 3;
export const tomato = 4;
//// [/lib.d.ts]
lib.d.ts-Text
//// [/lib.decorators.d.ts]
lib.decorators.d.ts-Text
//// [/lib.decorators.legacy.d.ts]
lib.decorators.legacy.d.ts-Text
//// [/tsconfig.json]
{ "files": ["a.ts", "b.ts"] }
Info seq [hh:mm:ss:mss] request:
{
"seq": 0,
"type": "request",
"arguments": {
"file": "/a.ts"
},
"command": "open"
}
Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /a.ts ProjectRootPath: undefined:: Result: /tsconfig.json
Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file
Info seq [hh:mm:ss:mss] event:
{
"seq": 0,
"type": "event",
"event": "projectLoadingStart",
"body": {
"projectName": "/tsconfig.json",
"reason": "Creating possible configured project for /a.ts to open"
}
}
Info seq [hh:mm:ss:mss] Config: /tsconfig.json : {
"rootNames": [
"/a.ts",
"/b.ts"
],
"options": {
"configFilePath": "/tsconfig.json"
}
}
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /b.ts 500 undefined WatchType: Closed Script info
Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info
Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured)
Info seq [hh:mm:ss:mss] Files (5)
/lib.d.ts Text-1 lib.d.ts-Text
/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
/a.ts SVC-1-0 "function foo() {\n const p = 1;\n function bar() {\n console.log(\"Testing\");\n }\n console.log(\"yes\");\n}\nclass bar {\n constructor() {\n function a() {\n function aa() {\n console.log(\"have a good day\");\n }\n \n }\n a();\n function b() {\n function c() {\n export const testing = 1;\n const test = 1 + testing + 3;\n }\n }\n b();\n }\n c() {\n console.log(\"hello again\");\n function k() {\n const happy = banana + avocados;\n }\n }\n}"
/b.ts Text-1 "export const juice = 1;\nexport const sauce = 2;\nexport const fig = 3;\nexport const tomato = 4;"
lib.d.ts
Default library for target 'es5'
lib.decorators.d.ts
Library referenced via 'decorators' from file 'lib.d.ts'
lib.decorators.legacy.d.ts
Library referenced via 'decorators.legacy' from file 'lib.d.ts'
a.ts
Part of 'files' list in tsconfig.json
b.ts
Part of 'files' list in tsconfig.json
Info seq [hh:mm:ss:mss] -----------------------------------------------
Info seq [hh:mm:ss:mss] event:
{
"seq": 0,
"type": "event",
"event": "projectLoadingFinish",
"body": {
"projectName": "/tsconfig.json"
}
}
Info seq [hh:mm:ss:mss] event:
{
"seq": 0,
"type": "event",
"event": "configFileDiag",
"body": {
"triggerFile": "/a.ts",
"configFile": "/tsconfig.json",
"diagnostics": []
}
}
Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured)
Info seq [hh:mm:ss:mss] Files (5)
Info seq [hh:mm:ss:mss] -----------------------------------------------
Info seq [hh:mm:ss:mss] Open files:
Info seq [hh:mm:ss:mss] FileName: /a.ts ProjectRootPath: undefined
Info seq [hh:mm:ss:mss] Projects: /tsconfig.json
Info seq [hh:mm:ss:mss] response:
{
"seq": 0,
"type": "response",
"command": "open",
"request_seq": 0,
"success": true,
"performanceData": {
"updateGraphDurationMs": *
}
}
After Request
watchedFiles::
/b.ts: *new*
{"pollingInterval":500}
/lib.d.ts: *new*
{"pollingInterval":500}
/lib.decorators.d.ts: *new*
{"pollingInterval":500}
/lib.decorators.legacy.d.ts: *new*
{"pollingInterval":500}
/tsconfig.json: *new*
{"pollingInterval":2000}
Projects::
/tsconfig.json (Configured) *new*
projectStateVersion: 1
projectProgramVersion: 1
ScriptInfos::
/a.ts (Open) *new*
version: SVC-1-0
containingProjects: 1
/tsconfig.json *default*
/b.ts *new*
version: Text-1
containingProjects: 1
/tsconfig.json
/lib.d.ts *new*
version: Text-1
containingProjects: 1
/tsconfig.json
/lib.decorators.d.ts *new*
version: Text-1
containingProjects: 1
/tsconfig.json
/lib.decorators.legacy.d.ts *new*
version: Text-1
containingProjects: 1
/tsconfig.json
Info seq [hh:mm:ss:mss] request:
{
"seq": 1,
"type": "request",
"arguments": {
"formatOptions": {
"indentSize": 4,
"tabSize": 4,
"newLineCharacter": "\n",
"convertTabsToSpaces": true,
"indentStyle": 2,
"insertSpaceAfterConstructor": false,
"insertSpaceAfterCommaDelimiter": true,
"insertSpaceAfterSemicolonInForStatements": true,
"insertSpaceBeforeAndAfterBinaryOperators": true,
"insertSpaceAfterKeywordsInControlFlowStatements": true,
"insertSpaceAfterFunctionKeywordForAnonymousFunctions": false,
"insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false,
"insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false,
"insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true,
"insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false,
"insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": false,
"insertSpaceBeforeFunctionParenthesis": false,
"placeOpenBraceOnNewLineForFunctions": false,
"placeOpenBraceOnNewLineForControlBlocks": false,
"semicolons": "ignore",
"trimTrailingWhitespace": true,
"indentSwitchCase": true
}
},
"command": "configure"
}
Info seq [hh:mm:ss:mss] Format host information updated
Info seq [hh:mm:ss:mss] response:
{
"seq": 0,
"type": "response",
"command": "configure",
"request_seq": 1,
"success": true
}
Info seq [hh:mm:ss:mss] request:
{
"seq": 2,
"type": "request",
"arguments": {
"file": "/a.ts",
"pastedText": [
"juice",
"sole.log(sauce + juice);",
"fig + kiwi",
"function k() {\n const cherry =tomato + kiwi;\n }"
],
"pasteLocations": [
{
"start": {
"line": 4,
"offset": 20
},
"end": {
"line": 4,
"offset": 29
}
},
{
"start": {
"line": 12,
"offset": 19
},
"end": {
"line": 12,
"offset": 47
}
},
{
"start": {
"line": 20,
"offset": 29
},
"end": {
"line": 20,
"offset": 43
}
},
{
"start": {
"line": 27,
"offset": 9
},
"end": {
"line": 29,
"offset": 10
}
}
]
},
"command": "getPasteEdits"
}
Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json
Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: false structureIsReused:: Completely Elapsed:: *ms
Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured)
Info seq [hh:mm:ss:mss] Files (5)
/lib.d.ts Text-1 lib.d.ts-Text
/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
/a.ts SVC-1-1 "function foo() {\n const p = 1;\n function bar() {\n console.log(juice);\n }\n console.log(\"yes\");\n}\nclass bar {\n constructor() {\n function a() {\n function aa() {\n console.log(sauce + juice);\n }\n \n }\n a();\n function b() {\n function c() {\n export const testing = 1;\n const test = fig + kiwi3;\n }\n }\n b();\n }\n c() {\n console.log(\"hello again\");\n function k() {\n const cherry =tomato + kiwi;\n }\n }\n}"
/b.ts Text-1 "export const juice = 1;\nexport const sauce = 2;\nexport const fig = 3;\nexport const tomato = 4;"
Info seq [hh:mm:ss:mss] -----------------------------------------------
Info seq [hh:mm:ss:mss] response:
{
"seq": 0,
"type": "response",
"command": "getPasteEdits",
"request_seq": 2,
"success": true,
"performanceData": {
"updateGraphDurationMs": *
},
"body": {
"edits": [
{
"fileName": "/a.ts",
"textChanges": [
{
"start": {
"line": 1,
"offset": 1
},
"end": {
"line": 1,
"offset": 1
},
"newText": "import { sauce, juice, fig, tomato } from \"./b\";\n\n"
},
{
"start": {
"line": 4,
"offset": 20
},
"end": {
"line": 4,
"offset": 29
},
"newText": "juice"
},
{
"start": {
"line": 12,
"offset": 19
},
"end": {
"line": 12,
"offset": 47
},
"newText": "sole.log(sauce + juice);"
},
{
"start": {
"line": 20,
"offset": 29
},
"end": {
"line": 20,
"offset": 43
},
"newText": "fig + kiwi"
},
{
"start": {
"line": 27,
"offset": 9
},
"end": {
"line": 29,
"offset": 10
},
"newText": "function k() {\n const cherry =tomato + kiwi;\n }"
}
]
}
],
"fixId": "providePostPasteEdits"
}
}
After Request
Projects::
/tsconfig.json (Configured) *changed*
projectStateVersion: 3 *changed*
projectProgramVersion: 1
dirty: true *changed*
ScriptInfos::
/a.ts (Open) *changed*
version: SVC-1-2 *changed*
containingProjects: 1
/tsconfig.json *default*
/b.ts
version: Text-1
containingProjects: 1
/tsconfig.json
/lib.d.ts
version: Text-1
containingProjects: 1
/tsconfig.json
/lib.decorators.d.ts
version: Text-1
containingProjects: 1
/tsconfig.json
/lib.decorators.legacy.d.ts
version: Text-1
containingProjects: 1
/tsconfig.json
@@ -0,0 +1,395 @@
currentDirectory:: / useCaseSensitiveFileNames: false
Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist
//// [/a.ts]
function foo() {
console.log("yes");
}
class bar {
constructor() {
function a() {
console.log("have a good day");
}
a();
function b() {
function c() {
const test = 1 + 2 + 3;
}
}
b();
}
c() {
console.log("hello again");
function k() {
const happy = 1 + banana + avocados;
}
}
}
//// [/b.ts]
export const juice = 1;
export const sauce = 2;
export const apple = 3;
export const tomato = 4;
//// [/lib.d.ts]
lib.d.ts-Text
//// [/lib.decorators.d.ts]
lib.decorators.d.ts-Text
//// [/lib.decorators.legacy.d.ts]
lib.decorators.legacy.d.ts-Text
//// [/tsconfig.json]
{ "files": ["a.ts", "b.ts"] }
Info seq [hh:mm:ss:mss] request:
{
"seq": 0,
"type": "request",
"arguments": {
"file": "/a.ts"
},
"command": "open"
}
Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /a.ts ProjectRootPath: undefined:: Result: /tsconfig.json
Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file
Info seq [hh:mm:ss:mss] event:
{
"seq": 0,
"type": "event",
"event": "projectLoadingStart",
"body": {
"projectName": "/tsconfig.json",
"reason": "Creating possible configured project for /a.ts to open"
}
}
Info seq [hh:mm:ss:mss] Config: /tsconfig.json : {
"rootNames": [
"/a.ts",
"/b.ts"
],
"options": {
"configFilePath": "/tsconfig.json"
}
}
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /b.ts 500 undefined WatchType: Closed Script info
Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info
Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured)
Info seq [hh:mm:ss:mss] Files (5)
/lib.d.ts Text-1 lib.d.ts-Text
/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
/a.ts SVC-1-0 "function foo() {\n console.log(\"yes\");\n}\nclass bar {\n constructor() {\n function a() {\n console.log(\"have a good day\");\n }\n a();\n function b() {\n function c() {\n const test = 1 + 2 + 3;\n }\n }\n b();\n }\n c() {\n console.log(\"hello again\");\n function k() {\n const happy = 1 + banana + avocados;\n }\n }\n}"
/b.ts Text-1 "export const juice = 1;\nexport const sauce = 2;\nexport const apple = 3;\nexport const tomato = 4;"
lib.d.ts
Default library for target 'es5'
lib.decorators.d.ts
Library referenced via 'decorators' from file 'lib.d.ts'
lib.decorators.legacy.d.ts
Library referenced via 'decorators.legacy' from file 'lib.d.ts'
a.ts
Part of 'files' list in tsconfig.json
b.ts
Part of 'files' list in tsconfig.json
Info seq [hh:mm:ss:mss] -----------------------------------------------
Info seq [hh:mm:ss:mss] event:
{
"seq": 0,
"type": "event",
"event": "projectLoadingFinish",
"body": {
"projectName": "/tsconfig.json"
}
}
Info seq [hh:mm:ss:mss] event:
{
"seq": 0,
"type": "event",
"event": "configFileDiag",
"body": {
"triggerFile": "/a.ts",
"configFile": "/tsconfig.json",
"diagnostics": []
}
}
Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured)
Info seq [hh:mm:ss:mss] Files (5)
Info seq [hh:mm:ss:mss] -----------------------------------------------
Info seq [hh:mm:ss:mss] Open files:
Info seq [hh:mm:ss:mss] FileName: /a.ts ProjectRootPath: undefined
Info seq [hh:mm:ss:mss] Projects: /tsconfig.json
Info seq [hh:mm:ss:mss] response:
{
"seq": 0,
"type": "response",
"command": "open",
"request_seq": 0,
"success": true,
"performanceData": {
"updateGraphDurationMs": *
}
}
After Request
watchedFiles::
/b.ts: *new*
{"pollingInterval":500}
/lib.d.ts: *new*
{"pollingInterval":500}
/lib.decorators.d.ts: *new*
{"pollingInterval":500}
/lib.decorators.legacy.d.ts: *new*
{"pollingInterval":500}
/tsconfig.json: *new*
{"pollingInterval":2000}
Projects::
/tsconfig.json (Configured) *new*
projectStateVersion: 1
projectProgramVersion: 1
ScriptInfos::
/a.ts (Open) *new*
version: SVC-1-0
containingProjects: 1
/tsconfig.json *default*
/b.ts *new*
version: Text-1
containingProjects: 1
/tsconfig.json
/lib.d.ts *new*
version: Text-1
containingProjects: 1
/tsconfig.json
/lib.decorators.d.ts *new*
version: Text-1
containingProjects: 1
/tsconfig.json
/lib.decorators.legacy.d.ts *new*
version: Text-1
containingProjects: 1
/tsconfig.json
Info seq [hh:mm:ss:mss] request:
{
"seq": 1,
"type": "request",
"arguments": {
"formatOptions": {
"indentSize": 4,
"tabSize": 4,
"newLineCharacter": "\n",
"convertTabsToSpaces": true,
"indentStyle": 2,
"insertSpaceAfterConstructor": false,
"insertSpaceAfterCommaDelimiter": true,
"insertSpaceAfterSemicolonInForStatements": true,
"insertSpaceBeforeAndAfterBinaryOperators": true,
"insertSpaceAfterKeywordsInControlFlowStatements": true,
"insertSpaceAfterFunctionKeywordForAnonymousFunctions": false,
"insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false,
"insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false,
"insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true,
"insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false,
"insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": false,
"insertSpaceBeforeFunctionParenthesis": false,
"placeOpenBraceOnNewLineForFunctions": false,
"placeOpenBraceOnNewLineForControlBlocks": false,
"semicolons": "ignore",
"trimTrailingWhitespace": true,
"indentSwitchCase": true
}
},
"command": "configure"
}
Info seq [hh:mm:ss:mss] Format host information updated
Info seq [hh:mm:ss:mss] response:
{
"seq": 0,
"type": "response",
"command": "configure",
"request_seq": 1,
"success": true
}
Info seq [hh:mm:ss:mss] request:
{
"seq": 2,
"type": "request",
"arguments": {
"file": "/a.ts",
"pastedText": [
"console.log(juice);",
"function kl() { return sauce; }",
"apple",
"function k() {\n const cherry = 3 + tomato + cucumber;\n }"
],
"pasteLocations": [
{
"start": {
"line": 2,
"offset": 5
},
"end": {
"line": 2,
"offset": 24
}
},
{
"start": {
"line": 7,
"offset": 13
},
"end": {
"line": 7,
"offset": 44
}
},
{
"start": {
"line": 12,
"offset": 29
},
"end": {
"line": 12,
"offset": 34
}
},
{
"start": {
"line": 19,
"offset": 9
},
"end": {
"line": 21,
"offset": 10
}
}
]
},
"command": "getPasteEdits"
}
Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json
Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: false structureIsReused:: Completely Elapsed:: *ms
Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured)
Info seq [hh:mm:ss:mss] Files (5)
/lib.d.ts Text-1 lib.d.ts-Text
/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
/a.ts SVC-1-1 "function foo() {\n console.log(juice);\n}\nclass bar {\n constructor() {\n function a() {\n function kl() { return sauce; }\n }\n a();\n function b() {\n function c() {\n const test = apple + 3;\n }\n }\n b();\n }\n c() {\n console.log(\"hello again\");\n function k() {\n const cherry = 3 + tomato + cucumber;\n }\n }\n}"
/b.ts Text-1 "export const juice = 1;\nexport const sauce = 2;\nexport const apple = 3;\nexport const tomato = 4;"
Info seq [hh:mm:ss:mss] -----------------------------------------------
Info seq [hh:mm:ss:mss] response:
{
"seq": 0,
"type": "response",
"command": "getPasteEdits",
"request_seq": 2,
"success": true,
"performanceData": {
"updateGraphDurationMs": *
},
"body": {
"edits": [
{
"fileName": "/a.ts",
"textChanges": [
{
"start": {
"line": 1,
"offset": 1
},
"end": {
"line": 1,
"offset": 1
},
"newText": "import { juice, sauce, tomato } from \"./b\";\n\n"
},
{
"start": {
"line": 2,
"offset": 5
},
"end": {
"line": 2,
"offset": 24
},
"newText": "console.log(juice);"
},
{
"start": {
"line": 7,
"offset": 13
},
"end": {
"line": 7,
"offset": 44
},
"newText": "function kl() { return sauce; }"
},
{
"start": {
"line": 12,
"offset": 29
},
"end": {
"line": 12,
"offset": 34
},
"newText": "apple"
},
{
"start": {
"line": 19,
"offset": 9
},
"end": {
"line": 21,
"offset": 10
},
"newText": "function k() {\n const cherry = 3 + tomato + cucumber;\n }"
}
]
}
],
"fixId": "providePostPasteEdits"
}
}
After Request
Projects::
/tsconfig.json (Configured) *changed*
projectStateVersion: 3 *changed*
projectProgramVersion: 1
dirty: true *changed*
ScriptInfos::
/a.ts (Open) *changed*
version: SVC-1-2 *changed*
containingProjects: 1
/tsconfig.json *default*
/b.ts
version: Text-1
containingProjects: 1
/tsconfig.json
/lib.d.ts
version: Text-1
containingProjects: 1
/tsconfig.json
/lib.decorators.d.ts
version: Text-1
containingProjects: 1
/tsconfig.json
/lib.decorators.legacy.d.ts
version: Text-1
containingProjects: 1
/tsconfig.json
@@ -0,0 +1,392 @@
currentDirectory:: / useCaseSensitiveFileNames: false
Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist
//// [/a.ts]
function foo() {
console.log("Hello");
}
class bar {
constructor() {
function a() {
console.log("hii");
}
a();
function b() {
function c() {
console.log("hola");
}
}
b();
}
c() {
console.log("hello again");
}
}
//// [/b.ts]
export const juice = 1;
export const sauce = 2;
export const tomato = 3;
//// [/lib.d.ts]
lib.d.ts-Text
//// [/lib.decorators.d.ts]
lib.decorators.d.ts-Text
//// [/lib.decorators.legacy.d.ts]
lib.decorators.legacy.d.ts-Text
//// [/tsconfig.json]
{ "files": ["a.ts", "b.ts"] }
Info seq [hh:mm:ss:mss] request:
{
"seq": 0,
"type": "request",
"arguments": {
"file": "/a.ts"
},
"command": "open"
}
Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /a.ts ProjectRootPath: undefined:: Result: /tsconfig.json
Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file
Info seq [hh:mm:ss:mss] event:
{
"seq": 0,
"type": "event",
"event": "projectLoadingStart",
"body": {
"projectName": "/tsconfig.json",
"reason": "Creating possible configured project for /a.ts to open"
}
}
Info seq [hh:mm:ss:mss] Config: /tsconfig.json : {
"rootNames": [
"/a.ts",
"/b.ts"
],
"options": {
"configFilePath": "/tsconfig.json"
}
}
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /b.ts 500 undefined WatchType: Closed Script info
Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info
Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured)
Info seq [hh:mm:ss:mss] Files (5)
/lib.d.ts Text-1 lib.d.ts-Text
/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
/a.ts SVC-1-0 "function foo() {\n console.log(\"Hello\");\n}\nclass bar {\n constructor() {\n function a() {\n console.log(\"hii\");\n }\n a();\n function b() {\n function c() {\n console.log(\"hola\");\n }\n }\n b();\n }\n c() {\n console.log(\"hello again\");\n \n }\n}"
/b.ts Text-1 "export const juice = 1;\nexport const sauce = 2;\nexport const tomato = 3;"
lib.d.ts
Default library for target 'es5'
lib.decorators.d.ts
Library referenced via 'decorators' from file 'lib.d.ts'
lib.decorators.legacy.d.ts
Library referenced via 'decorators.legacy' from file 'lib.d.ts'
a.ts
Part of 'files' list in tsconfig.json
b.ts
Part of 'files' list in tsconfig.json
Info seq [hh:mm:ss:mss] -----------------------------------------------
Info seq [hh:mm:ss:mss] event:
{
"seq": 0,
"type": "event",
"event": "projectLoadingFinish",
"body": {
"projectName": "/tsconfig.json"
}
}
Info seq [hh:mm:ss:mss] event:
{
"seq": 0,
"type": "event",
"event": "configFileDiag",
"body": {
"triggerFile": "/a.ts",
"configFile": "/tsconfig.json",
"diagnostics": []
}
}
Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured)
Info seq [hh:mm:ss:mss] Files (5)
Info seq [hh:mm:ss:mss] -----------------------------------------------
Info seq [hh:mm:ss:mss] Open files:
Info seq [hh:mm:ss:mss] FileName: /a.ts ProjectRootPath: undefined
Info seq [hh:mm:ss:mss] Projects: /tsconfig.json
Info seq [hh:mm:ss:mss] response:
{
"seq": 0,
"type": "response",
"command": "open",
"request_seq": 0,
"success": true,
"performanceData": {
"updateGraphDurationMs": *
}
}
After Request
watchedFiles::
/b.ts: *new*
{"pollingInterval":500}
/lib.d.ts: *new*
{"pollingInterval":500}
/lib.decorators.d.ts: *new*
{"pollingInterval":500}
/lib.decorators.legacy.d.ts: *new*
{"pollingInterval":500}
/tsconfig.json: *new*
{"pollingInterval":2000}
Projects::
/tsconfig.json (Configured) *new*
projectStateVersion: 1
projectProgramVersion: 1
ScriptInfos::
/a.ts (Open) *new*
version: SVC-1-0
containingProjects: 1
/tsconfig.json *default*
/b.ts *new*
version: Text-1
containingProjects: 1
/tsconfig.json
/lib.d.ts *new*
version: Text-1
containingProjects: 1
/tsconfig.json
/lib.decorators.d.ts *new*
version: Text-1
containingProjects: 1
/tsconfig.json
/lib.decorators.legacy.d.ts *new*
version: Text-1
containingProjects: 1
/tsconfig.json
Info seq [hh:mm:ss:mss] request:
{
"seq": 1,
"type": "request",
"arguments": {
"formatOptions": {
"indentSize": 4,
"tabSize": 4,
"newLineCharacter": "\n",
"convertTabsToSpaces": true,
"indentStyle": 2,
"insertSpaceAfterConstructor": false,
"insertSpaceAfterCommaDelimiter": true,
"insertSpaceAfterSemicolonInForStatements": true,
"insertSpaceBeforeAndAfterBinaryOperators": true,
"insertSpaceAfterKeywordsInControlFlowStatements": true,
"insertSpaceAfterFunctionKeywordForAnonymousFunctions": false,
"insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false,
"insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false,
"insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true,
"insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false,
"insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": false,
"insertSpaceBeforeFunctionParenthesis": false,
"placeOpenBraceOnNewLineForFunctions": false,
"placeOpenBraceOnNewLineForControlBlocks": false,
"semicolons": "ignore",
"trimTrailingWhitespace": true,
"indentSwitchCase": true
}
},
"command": "configure"
}
Info seq [hh:mm:ss:mss] Format host information updated
Info seq [hh:mm:ss:mss] response:
{
"seq": 0,
"type": "response",
"command": "configure",
"request_seq": 1,
"success": true
}
Info seq [hh:mm:ss:mss] request:
{
"seq": 2,
"type": "request",
"arguments": {
"file": "/a.ts",
"pastedText": [
"log(sauce);",
"const apple = 1 + juice",
"const kiwi = 1;",
"function k() {\n const cherry = 3 + tomato + cucumber;\n }"
],
"pasteLocations": [
{
"start": {
"line": 2,
"offset": 13
},
"end": {
"line": 2,
"offset": 26
}
},
{
"start": {
"line": 5,
"offset": 5
},
"end": {
"line": 5,
"offset": 12
}
},
{
"start": {
"line": 12,
"offset": 16
},
"end": {
"line": 12,
"offset": 36
}
},
{
"start": {
"line": 19,
"offset": 9
},
"end": {
"line": 19,
"offset": 9
}
}
]
},
"command": "getPasteEdits"
}
Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json
Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: false structureIsReused:: Completely Elapsed:: *ms
Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured)
Info seq [hh:mm:ss:mss] Files (5)
/lib.d.ts Text-1 lib.d.ts-Text
/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
/a.ts SVC-1-1 "function foo() {\n console.log(sauce);\n}\nclass bar {\n const apple = 1 + juicector() {\n function a() {\n console.log(\"hii\");\n }\n a();\n function b() {\n function c() {\n const kiwi = 1;\n }\n }\n b();\n }\n c() {\n console.log(\"hello again\");\n function k() {\n const cherry = 3 + tomato + cucumber;\n }\n }\n}"
/b.ts Text-1 "export const juice = 1;\nexport const sauce = 2;\nexport const tomato = 3;"
Info seq [hh:mm:ss:mss] -----------------------------------------------
Info seq [hh:mm:ss:mss] response:
{
"seq": 0,
"type": "response",
"command": "getPasteEdits",
"request_seq": 2,
"success": true,
"performanceData": {
"updateGraphDurationMs": *
},
"body": {
"edits": [
{
"fileName": "/a.ts",
"textChanges": [
{
"start": {
"line": 1,
"offset": 1
},
"end": {
"line": 1,
"offset": 1
},
"newText": "import { sauce, tomato } from \"./b\";\n\n"
},
{
"start": {
"line": 2,
"offset": 13
},
"end": {
"line": 2,
"offset": 26
},
"newText": "log(sauce);"
},
{
"start": {
"line": 5,
"offset": 5
},
"end": {
"line": 5,
"offset": 12
},
"newText": "const apple = 1 + juice"
},
{
"start": {
"line": 12,
"offset": 16
},
"end": {
"line": 12,
"offset": 36
},
"newText": "const kiwi = 1;"
},
{
"start": {
"line": 19,
"offset": 9
},
"end": {
"line": 19,
"offset": 9
},
"newText": "function k() {\n const cherry = 3 + tomato + cucumber;\n }"
}
]
}
],
"fixId": "providePostPasteEdits"
}
}
After Request
Projects::
/tsconfig.json (Configured) *changed*
projectStateVersion: 3 *changed*
projectProgramVersion: 1
dirty: true *changed*
ScriptInfos::
/a.ts (Open) *changed*
version: SVC-1-2 *changed*
containingProjects: 1
/tsconfig.json *default*
/b.ts
version: Text-1
containingProjects: 1
/tsconfig.json
/lib.d.ts
version: Text-1
containingProjects: 1
/tsconfig.json
/lib.decorators.d.ts
version: Text-1
containingProjects: 1
/tsconfig.json
/lib.decorators.legacy.d.ts
version: Text-1
containingProjects: 1
/tsconfig.json
@@ -0,0 +1,412 @@
currentDirectory:: / useCaseSensitiveFileNames: false
Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist
//// [/a.ts]
function foo() {
const p = 1;
}
function too() {
function k(t: string) {
console.log(t);
}
}
class bar {
constructor() {
function a() {
console.log("hello");
}
a();
}
c() {
console.log("hello again");
function k() {
const happy = banana + avocados;
}
}
}
//// [/b.ts]
export const juices = 1;
export const sauce = 2;
//// [/c.ts]
export const figs = 3;
export const tomato = 4;
//// [/lib.d.ts]
lib.d.ts-Text
//// [/lib.decorators.d.ts]
lib.decorators.d.ts-Text
//// [/lib.decorators.legacy.d.ts]
lib.decorators.legacy.d.ts-Text
//// [/tsconfig.json]
{ "files": ["a.ts", "b.ts", "c.ts"] }
Info seq [hh:mm:ss:mss] request:
{
"seq": 0,
"type": "request",
"arguments": {
"file": "/a.ts"
},
"command": "open"
}
Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /a.ts ProjectRootPath: undefined:: Result: /tsconfig.json
Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file
Info seq [hh:mm:ss:mss] event:
{
"seq": 0,
"type": "event",
"event": "projectLoadingStart",
"body": {
"projectName": "/tsconfig.json",
"reason": "Creating possible configured project for /a.ts to open"
}
}
Info seq [hh:mm:ss:mss] Config: /tsconfig.json : {
"rootNames": [
"/a.ts",
"/b.ts",
"/c.ts"
],
"options": {
"configFilePath": "/tsconfig.json"
}
}
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /b.ts 500 undefined WatchType: Closed Script info
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /c.ts 500 undefined WatchType: Closed Script info
Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info
Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured)
Info seq [hh:mm:ss:mss] Files (6)
/lib.d.ts Text-1 lib.d.ts-Text
/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
/a.ts SVC-1-0 "function foo() {\n const p = 1;\n}\nfunction too() {\n function k(t: string) {\n console.log(t);\n }\n}\nclass bar {\n constructor() {\n function a() {\n console.log(\"hello\");\n }\n a();\n }\n c() {\n console.log(\"hello again\");\n function k() {\n const happy = banana + avocados;\n }\n }\n}"
/b.ts Text-1 "export const juices = 1;\nexport const sauce = 2;"
/c.ts Text-1 "export const figs = 3;\nexport const tomato = 4;"
lib.d.ts
Default library for target 'es5'
lib.decorators.d.ts
Library referenced via 'decorators' from file 'lib.d.ts'
lib.decorators.legacy.d.ts
Library referenced via 'decorators.legacy' from file 'lib.d.ts'
a.ts
Part of 'files' list in tsconfig.json
b.ts
Part of 'files' list in tsconfig.json
c.ts
Part of 'files' list in tsconfig.json
Info seq [hh:mm:ss:mss] -----------------------------------------------
Info seq [hh:mm:ss:mss] event:
{
"seq": 0,
"type": "event",
"event": "projectLoadingFinish",
"body": {
"projectName": "/tsconfig.json"
}
}
Info seq [hh:mm:ss:mss] event:
{
"seq": 0,
"type": "event",
"event": "configFileDiag",
"body": {
"triggerFile": "/a.ts",
"configFile": "/tsconfig.json",
"diagnostics": []
}
}
Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured)
Info seq [hh:mm:ss:mss] Files (6)
Info seq [hh:mm:ss:mss] -----------------------------------------------
Info seq [hh:mm:ss:mss] Open files:
Info seq [hh:mm:ss:mss] FileName: /a.ts ProjectRootPath: undefined
Info seq [hh:mm:ss:mss] Projects: /tsconfig.json
Info seq [hh:mm:ss:mss] response:
{
"seq": 0,
"type": "response",
"command": "open",
"request_seq": 0,
"success": true,
"performanceData": {
"updateGraphDurationMs": *
}
}
After Request
watchedFiles::
/b.ts: *new*
{"pollingInterval":500}
/c.ts: *new*
{"pollingInterval":500}
/lib.d.ts: *new*
{"pollingInterval":500}
/lib.decorators.d.ts: *new*
{"pollingInterval":500}
/lib.decorators.legacy.d.ts: *new*
{"pollingInterval":500}
/tsconfig.json: *new*
{"pollingInterval":2000}
Projects::
/tsconfig.json (Configured) *new*
projectStateVersion: 1
projectProgramVersion: 1
ScriptInfos::
/a.ts (Open) *new*
version: SVC-1-0
containingProjects: 1
/tsconfig.json *default*
/b.ts *new*
version: Text-1
containingProjects: 1
/tsconfig.json
/c.ts *new*
version: Text-1
containingProjects: 1
/tsconfig.json
/lib.d.ts *new*
version: Text-1
containingProjects: 1
/tsconfig.json
/lib.decorators.d.ts *new*
version: Text-1
containingProjects: 1
/tsconfig.json
/lib.decorators.legacy.d.ts *new*
version: Text-1
containingProjects: 1
/tsconfig.json
Info seq [hh:mm:ss:mss] request:
{
"seq": 1,
"type": "request",
"arguments": {
"formatOptions": {
"indentSize": 4,
"tabSize": 4,
"newLineCharacter": "\n",
"convertTabsToSpaces": true,
"indentStyle": 2,
"insertSpaceAfterConstructor": false,
"insertSpaceAfterCommaDelimiter": true,
"insertSpaceAfterSemicolonInForStatements": true,
"insertSpaceBeforeAndAfterBinaryOperators": true,
"insertSpaceAfterKeywordsInControlFlowStatements": true,
"insertSpaceAfterFunctionKeywordForAnonymousFunctions": false,
"insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false,
"insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false,
"insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true,
"insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false,
"insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": false,
"insertSpaceBeforeFunctionParenthesis": false,
"placeOpenBraceOnNewLineForFunctions": false,
"placeOpenBraceOnNewLineForControlBlocks": false,
"semicolons": "ignore",
"trimTrailingWhitespace": true,
"indentSwitchCase": true
}
},
"command": "configure"
}
Info seq [hh:mm:ss:mss] Format host information updated
Info seq [hh:mm:ss:mss] response:
{
"seq": 0,
"type": "response",
"command": "configure",
"request_seq": 1,
"success": true
}
Info seq [hh:mm:ss:mss] request:
{
"seq": 2,
"type": "request",
"arguments": {
"file": "/a.ts",
"pastedText": [
"const t = figs;",
"apples : number",
" console.log(sauce + tomato); ",
"//function k(i:string) {\n const cherry = 3 + juices + cucumber;\n// }"
],
"pasteLocations": [
{
"start": {
"line": 2,
"offset": 4
},
"end": {
"line": 2,
"offset": 16
}
},
{
"start": {
"line": 5,
"offset": 15
},
"end": {
"line": 5,
"offset": 24
}
},
{
"start": {
"line": 12,
"offset": 1
},
"end": {
"line": 12,
"offset": 34
}
},
{
"start": {
"line": 18,
"offset": 9
},
"end": {
"line": 20,
"offset": 10
}
}
]
},
"command": "getPasteEdits"
}
Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json
Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: false structureIsReused:: Completely Elapsed:: *ms
Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured)
Info seq [hh:mm:ss:mss] Files (6)
/lib.d.ts Text-1 lib.d.ts-Text
/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
/a.ts SVC-1-1 "function foo() {\n const t = figs;\n}\nfunction too() {\n function k(apples : number) {\n console.log(t);\n }\n}\nclass bar {\n constructor() {\n function a() {\n console.log(sauce + tomato); \n }\n a();\n }\n c() {\n console.log(\"hello again\");\n //function k(i:string) {\n const cherry = 3 + juices + cucumber;\n// }\n }\n}"
/b.ts Text-1 "export const juices = 1;\nexport const sauce = 2;"
/c.ts Text-1 "export const figs = 3;\nexport const tomato = 4;"
Info seq [hh:mm:ss:mss] -----------------------------------------------
Info seq [hh:mm:ss:mss] response:
{
"seq": 0,
"type": "response",
"command": "getPasteEdits",
"request_seq": 2,
"success": true,
"performanceData": {
"updateGraphDurationMs": *
},
"body": {
"edits": [
{
"fileName": "/a.ts",
"textChanges": [
{
"start": {
"line": 1,
"offset": 1
},
"end": {
"line": 1,
"offset": 1
},
"newText": "import { sauce, juices } from \"./b\";\nimport { figs, tomato } from \"./c\";\n\n"
},
{
"start": {
"line": 2,
"offset": 4
},
"end": {
"line": 2,
"offset": 16
},
"newText": "const t = figs;"
},
{
"start": {
"line": 5,
"offset": 15
},
"end": {
"line": 5,
"offset": 24
},
"newText": "apples : number"
},
{
"start": {
"line": 12,
"offset": 1
},
"end": {
"line": 12,
"offset": 34
},
"newText": " console.log(sauce + tomato); "
},
{
"start": {
"line": 18,
"offset": 9
},
"end": {
"line": 20,
"offset": 10
},
"newText": "//function k(i:string) {\n const cherry = 3 + juices + cucumber;\n// }"
}
]
}
],
"fixId": "providePostPasteEdits"
}
}
After Request
Projects::
/tsconfig.json (Configured) *changed*
projectStateVersion: 3 *changed*
projectProgramVersion: 1
dirty: true *changed*
ScriptInfos::
/a.ts (Open) *changed*
version: SVC-1-2 *changed*
containingProjects: 1
/tsconfig.json *default*
/b.ts
version: Text-1
containingProjects: 1
/tsconfig.json
/c.ts
version: Text-1
containingProjects: 1
/tsconfig.json
/lib.d.ts
version: Text-1
containingProjects: 1
/tsconfig.json
/lib.decorators.d.ts
version: Text-1
containingProjects: 1
/tsconfig.json
/lib.decorators.legacy.d.ts
version: Text-1
containingProjects: 1
/tsconfig.json
@@ -0,0 +1,412 @@
currentDirectory:: / useCaseSensitiveFileNames: false
Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist
//// [/a.ts]
function foo() {
console.log("Good day");
}
function too() {
function k(t: string) {
console.log("Happy Holidays");
}
}
class bar {
constructor() {
function a() {
console.log("hello");
}
a();
}
c() {
console.log("hello again");
function k() {
const happy = banana + avocados;
}
}
}
//// [/b.ts]
export const juices = 1;
export const sauce = 2;
//// [/c.ts]
export const figs = 3;
export const tomato = 4;
//// [/lib.d.ts]
lib.d.ts-Text
//// [/lib.decorators.d.ts]
lib.decorators.d.ts-Text
//// [/lib.decorators.legacy.d.ts]
lib.decorators.legacy.d.ts-Text
//// [/tsconfig.json]
{ "files": ["a.ts", "b.ts", "c.ts"] }
Info seq [hh:mm:ss:mss] request:
{
"seq": 0,
"type": "request",
"arguments": {
"file": "/a.ts"
},
"command": "open"
}
Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /a.ts ProjectRootPath: undefined:: Result: /tsconfig.json
Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file
Info seq [hh:mm:ss:mss] event:
{
"seq": 0,
"type": "event",
"event": "projectLoadingStart",
"body": {
"projectName": "/tsconfig.json",
"reason": "Creating possible configured project for /a.ts to open"
}
}
Info seq [hh:mm:ss:mss] Config: /tsconfig.json : {
"rootNames": [
"/a.ts",
"/b.ts",
"/c.ts"
],
"options": {
"configFilePath": "/tsconfig.json"
}
}
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /b.ts 500 undefined WatchType: Closed Script info
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /c.ts 500 undefined WatchType: Closed Script info
Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info
Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured)
Info seq [hh:mm:ss:mss] Files (6)
/lib.d.ts Text-1 lib.d.ts-Text
/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
/a.ts SVC-1-0 "function foo() {\n console.log(\"Good day\");\n}\nfunction too() {\n function k(t: string) {\n console.log(\"Happy Holidays\");\n }\n}\nclass bar {\n constructor() {\n function a() {\n console.log(\"hello\");\n }\n a();\n }\n c() {\n console.log(\"hello again\");\n function k() {\n const happy = banana + avocados;\n }\n }\n}"
/b.ts Text-1 "export const juices = 1;\nexport const sauce = 2;"
/c.ts Text-1 "export const figs = 3;\nexport const tomato = 4;"
lib.d.ts
Default library for target 'es5'
lib.decorators.d.ts
Library referenced via 'decorators' from file 'lib.d.ts'
lib.decorators.legacy.d.ts
Library referenced via 'decorators.legacy' from file 'lib.d.ts'
a.ts
Part of 'files' list in tsconfig.json
b.ts
Part of 'files' list in tsconfig.json
c.ts
Part of 'files' list in tsconfig.json
Info seq [hh:mm:ss:mss] -----------------------------------------------
Info seq [hh:mm:ss:mss] event:
{
"seq": 0,
"type": "event",
"event": "projectLoadingFinish",
"body": {
"projectName": "/tsconfig.json"
}
}
Info seq [hh:mm:ss:mss] event:
{
"seq": 0,
"type": "event",
"event": "configFileDiag",
"body": {
"triggerFile": "/a.ts",
"configFile": "/tsconfig.json",
"diagnostics": []
}
}
Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured)
Info seq [hh:mm:ss:mss] Files (6)
Info seq [hh:mm:ss:mss] -----------------------------------------------
Info seq [hh:mm:ss:mss] Open files:
Info seq [hh:mm:ss:mss] FileName: /a.ts ProjectRootPath: undefined
Info seq [hh:mm:ss:mss] Projects: /tsconfig.json
Info seq [hh:mm:ss:mss] response:
{
"seq": 0,
"type": "response",
"command": "open",
"request_seq": 0,
"success": true,
"performanceData": {
"updateGraphDurationMs": *
}
}
After Request
watchedFiles::
/b.ts: *new*
{"pollingInterval":500}
/c.ts: *new*
{"pollingInterval":500}
/lib.d.ts: *new*
{"pollingInterval":500}
/lib.decorators.d.ts: *new*
{"pollingInterval":500}
/lib.decorators.legacy.d.ts: *new*
{"pollingInterval":500}
/tsconfig.json: *new*
{"pollingInterval":2000}
Projects::
/tsconfig.json (Configured) *new*
projectStateVersion: 1
projectProgramVersion: 1
ScriptInfos::
/a.ts (Open) *new*
version: SVC-1-0
containingProjects: 1
/tsconfig.json *default*
/b.ts *new*
version: Text-1
containingProjects: 1
/tsconfig.json
/c.ts *new*
version: Text-1
containingProjects: 1
/tsconfig.json
/lib.d.ts *new*
version: Text-1
containingProjects: 1
/tsconfig.json
/lib.decorators.d.ts *new*
version: Text-1
containingProjects: 1
/tsconfig.json
/lib.decorators.legacy.d.ts *new*
version: Text-1
containingProjects: 1
/tsconfig.json
Info seq [hh:mm:ss:mss] request:
{
"seq": 1,
"type": "request",
"arguments": {
"formatOptions": {
"indentSize": 4,
"tabSize": 4,
"newLineCharacter": "\n",
"convertTabsToSpaces": true,
"indentStyle": 2,
"insertSpaceAfterConstructor": false,
"insertSpaceAfterCommaDelimiter": true,
"insertSpaceAfterSemicolonInForStatements": true,
"insertSpaceBeforeAndAfterBinaryOperators": true,
"insertSpaceAfterKeywordsInControlFlowStatements": true,
"insertSpaceAfterFunctionKeywordForAnonymousFunctions": false,
"insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false,
"insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false,
"insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true,
"insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false,
"insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": false,
"insertSpaceBeforeFunctionParenthesis": false,
"placeOpenBraceOnNewLineForFunctions": false,
"placeOpenBraceOnNewLineForControlBlocks": false,
"semicolons": "ignore",
"trimTrailingWhitespace": true,
"indentSwitchCase": true
}
},
"command": "configure"
}
Info seq [hh:mm:ss:mss] Format host information updated
Info seq [hh:mm:ss:mss] response:
{
"seq": 0,
"type": "response",
"command": "configure",
"request_seq": 1,
"success": true
}
Info seq [hh:mm:ss:mss] request:
{
"seq": 2,
"type": "request",
"arguments": {
"file": "/a.ts",
"pastedText": [
"console.log(\"Good \");",
"const k = figs + juices;",
" console.log(tomato);",
"(kiwi: string) {\n const cherry=tomato;\n }"
],
"pasteLocations": [
{
"start": {
"line": 2,
"offset": 4
},
"end": {
"line": 2,
"offset": 28
}
},
{
"start": {
"line": 6,
"offset": 8
},
"end": {
"line": 6,
"offset": 38
}
},
{
"start": {
"line": 12,
"offset": 1
},
"end": {
"line": 12,
"offset": 34
}
},
{
"start": {
"line": 18,
"offset": 19
},
"end": {
"line": 20,
"offset": 10
}
}
]
},
"command": "getPasteEdits"
}
Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json
Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: false structureIsReused:: Completely Elapsed:: *ms
Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured)
Info seq [hh:mm:ss:mss] Files (6)
/lib.d.ts Text-1 lib.d.ts-Text
/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
/a.ts SVC-1-1 "function foo() {\n console.log(\"Good \");\n}\nfunction too() {\n function k(t: string) {\n const k = figs + juices;\n }\n}\nclass bar {\n constructor() {\n function a() {\n console.log(tomato);\n }\n a();\n }\n c() {\n console.log(\"hello again\");\n function k(kiwi: string) {\n const cherry=tomato;\n }\n }\n}"
/b.ts Text-1 "export const juices = 1;\nexport const sauce = 2;"
/c.ts Text-1 "export const figs = 3;\nexport const tomato = 4;"
Info seq [hh:mm:ss:mss] -----------------------------------------------
Info seq [hh:mm:ss:mss] response:
{
"seq": 0,
"type": "response",
"command": "getPasteEdits",
"request_seq": 2,
"success": true,
"performanceData": {
"updateGraphDurationMs": *
},
"body": {
"edits": [
{
"fileName": "/a.ts",
"textChanges": [
{
"start": {
"line": 1,
"offset": 1
},
"end": {
"line": 1,
"offset": 1
},
"newText": "import { juices } from \"./b\";\nimport { figs, tomato } from \"./c\";\n\n"
},
{
"start": {
"line": 2,
"offset": 4
},
"end": {
"line": 2,
"offset": 28
},
"newText": "console.log(\"Good \");"
},
{
"start": {
"line": 6,
"offset": 8
},
"end": {
"line": 6,
"offset": 38
},
"newText": "const k = figs + juices;"
},
{
"start": {
"line": 12,
"offset": 1
},
"end": {
"line": 12,
"offset": 34
},
"newText": " console.log(tomato);"
},
{
"start": {
"line": 18,
"offset": 19
},
"end": {
"line": 20,
"offset": 10
},
"newText": "(kiwi: string) {\n const cherry=tomato;\n }"
}
]
}
],
"fixId": "providePostPasteEdits"
}
}
After Request
Projects::
/tsconfig.json (Configured) *changed*
projectStateVersion: 3 *changed*
projectProgramVersion: 1
dirty: true *changed*
ScriptInfos::
/a.ts (Open) *changed*
version: SVC-1-2 *changed*
containingProjects: 1
/tsconfig.json *default*
/b.ts
version: Text-1
containingProjects: 1
/tsconfig.json
/c.ts
version: Text-1
containingProjects: 1
/tsconfig.json
/lib.d.ts
version: Text-1
containingProjects: 1
/tsconfig.json
/lib.decorators.d.ts
version: Text-1
containingProjects: 1
/tsconfig.json
/lib.decorators.legacy.d.ts
version: Text-1
containingProjects: 1
/tsconfig.json
@@ -0,0 +1,276 @@
currentDirectory:: / useCaseSensitiveFileNames: false
Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist
//// [/a.ts]
//// [/b.ts]
export const b = 10;
//// [/lib.d.ts]
lib.d.ts-Text
//// [/lib.decorators.d.ts]
lib.decorators.d.ts-Text
//// [/lib.decorators.legacy.d.ts]
lib.decorators.legacy.d.ts-Text
//// [/tsconfig.json]
{ "files": ["a.ts", "b.ts"] }
Info seq [hh:mm:ss:mss] request:
{
"seq": 0,
"type": "request",
"arguments": {
"file": "/a.ts"
},
"command": "open"
}
Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /a.ts ProjectRootPath: undefined:: Result: /tsconfig.json
Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file
Info seq [hh:mm:ss:mss] event:
{
"seq": 0,
"type": "event",
"event": "projectLoadingStart",
"body": {
"projectName": "/tsconfig.json",
"reason": "Creating possible configured project for /a.ts to open"
}
}
Info seq [hh:mm:ss:mss] Config: /tsconfig.json : {
"rootNames": [
"/a.ts",
"/b.ts"
],
"options": {
"configFilePath": "/tsconfig.json"
}
}
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /b.ts 500 undefined WatchType: Closed Script info
Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info
Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured)
Info seq [hh:mm:ss:mss] Files (5)
/lib.d.ts Text-1 lib.d.ts-Text
/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
/a.ts SVC-1-0 ""
/b.ts Text-1 "export const b = 10;"
lib.d.ts
Default library for target 'es5'
lib.decorators.d.ts
Library referenced via 'decorators' from file 'lib.d.ts'
lib.decorators.legacy.d.ts
Library referenced via 'decorators.legacy' from file 'lib.d.ts'
a.ts
Part of 'files' list in tsconfig.json
b.ts
Part of 'files' list in tsconfig.json
Info seq [hh:mm:ss:mss] -----------------------------------------------
Info seq [hh:mm:ss:mss] event:
{
"seq": 0,
"type": "event",
"event": "projectLoadingFinish",
"body": {
"projectName": "/tsconfig.json"
}
}
Info seq [hh:mm:ss:mss] event:
{
"seq": 0,
"type": "event",
"event": "configFileDiag",
"body": {
"triggerFile": "/a.ts",
"configFile": "/tsconfig.json",
"diagnostics": []
}
}
Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured)
Info seq [hh:mm:ss:mss] Files (5)
Info seq [hh:mm:ss:mss] -----------------------------------------------
Info seq [hh:mm:ss:mss] Open files:
Info seq [hh:mm:ss:mss] FileName: /a.ts ProjectRootPath: undefined
Info seq [hh:mm:ss:mss] Projects: /tsconfig.json
Info seq [hh:mm:ss:mss] response:
{
"seq": 0,
"type": "response",
"command": "open",
"request_seq": 0,
"success": true,
"performanceData": {
"updateGraphDurationMs": *
}
}
After Request
watchedFiles::
/b.ts: *new*
{"pollingInterval":500}
/lib.d.ts: *new*
{"pollingInterval":500}
/lib.decorators.d.ts: *new*
{"pollingInterval":500}
/lib.decorators.legacy.d.ts: *new*
{"pollingInterval":500}
/tsconfig.json: *new*
{"pollingInterval":2000}
Projects::
/tsconfig.json (Configured) *new*
projectStateVersion: 1
projectProgramVersion: 1
ScriptInfos::
/a.ts (Open) *new*
version: SVC-1-0
containingProjects: 1
/tsconfig.json *default*
/b.ts *new*
version: Text-1
containingProjects: 1
/tsconfig.json
/lib.d.ts *new*
version: Text-1
containingProjects: 1
/tsconfig.json
/lib.decorators.d.ts *new*
version: Text-1
containingProjects: 1
/tsconfig.json
/lib.decorators.legacy.d.ts *new*
version: Text-1
containingProjects: 1
/tsconfig.json
Info seq [hh:mm:ss:mss] request:
{
"seq": 1,
"type": "request",
"arguments": {
"formatOptions": {
"indentSize": 4,
"tabSize": 4,
"newLineCharacter": "\n",
"convertTabsToSpaces": true,
"indentStyle": 2,
"insertSpaceAfterConstructor": false,
"insertSpaceAfterCommaDelimiter": true,
"insertSpaceAfterSemicolonInForStatements": true,
"insertSpaceBeforeAndAfterBinaryOperators": true,
"insertSpaceAfterKeywordsInControlFlowStatements": true,
"insertSpaceAfterFunctionKeywordForAnonymousFunctions": false,
"insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false,
"insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false,
"insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true,
"insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false,
"insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": false,
"insertSpaceBeforeFunctionParenthesis": false,
"placeOpenBraceOnNewLineForFunctions": false,
"placeOpenBraceOnNewLineForControlBlocks": false,
"semicolons": "ignore",
"trimTrailingWhitespace": true,
"indentSwitchCase": true
}
},
"command": "configure"
}
Info seq [hh:mm:ss:mss] Format host information updated
Info seq [hh:mm:ss:mss] response:
{
"seq": 0,
"type": "response",
"command": "configure",
"request_seq": 1,
"success": true
}
Info seq [hh:mm:ss:mss] request:
{
"seq": 2,
"type": "request",
"arguments": {
"file": "/a.ts",
"pastedText": [
"const b = 1;\nconsole.log(b);"
],
"pasteLocations": [
{
"start": {
"line": 1,
"offset": 1
},
"end": {
"line": 1,
"offset": 1
}
}
]
},
"command": "getPasteEdits"
}
Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json
Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: false structureIsReused:: Completely Elapsed:: *ms
Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured)
Info seq [hh:mm:ss:mss] Files (5)
/lib.d.ts Text-1 lib.d.ts-Text
/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
/a.ts SVC-1-1 "const b = 1;\nconsole.log(b);"
/b.ts Text-1 "export const b = 10;"
Info seq [hh:mm:ss:mss] -----------------------------------------------
Info seq [hh:mm:ss:mss] response:
{
"seq": 0,
"type": "response",
"command": "getPasteEdits",
"request_seq": 2,
"success": true,
"performanceData": {
"updateGraphDurationMs": *
},
"body": {
"edits": [],
"fixId": "providePostPasteEdits"
}
}
After Request
Projects::
/tsconfig.json (Configured) *changed*
projectStateVersion: 3 *changed*
projectProgramVersion: 1
dirty: true *changed*
ScriptInfos::
/a.ts (Open) *changed*
version: SVC-1-2 *changed*
containingProjects: 1
/tsconfig.json *default*
/b.ts
version: Text-1
containingProjects: 1
/tsconfig.json
/lib.d.ts
version: Text-1
containingProjects: 1
/tsconfig.json
/lib.decorators.d.ts
version: Text-1
containingProjects: 1
/tsconfig.json
/lib.decorators.legacy.d.ts
version: Text-1
containingProjects: 1
/tsconfig.json
@@ -18,12 +18,12 @@
// @Filename: /tsconfig.json
////{ "files": ["a.ts", "b.ts"] }
const range = test.ranges();
const ranges = test.ranges();
verify.pasteEdits({
args: {
pastedText: [`export const foo: Foo = {};`],
pasteLocations: [range[0]],
copiedFrom: { file: "b.ts", range: [range[1]] },
pasteLocations: [ranges[0]],
copiedFrom: { file: "b.ts", range: [ranges[1]] },
},
newFileContents: {
"/a.ts":
@@ -17,12 +17,12 @@
// @Filename: /tsconfig.json
////{ "files": ["c.ts", "a.ts", "b.ts"] }
const range = test.ranges();
const ranges = test.ranges();
verify.pasteEdits({
args: {
pastedText: [`console.log(abc);`],
pasteLocations: [range[0]],
copiedFrom: { file: "b.ts", range: [range[1]] },
pasteLocations: [ranges[0]],
copiedFrom: { file: "b.ts", range: [ranges[1]] },
},
newFileContents: {
"/c.ts":
@@ -19,11 +19,10 @@
// @Filename: /tsconfig.json
////{ "files": ["target.ts", "other.ts", "other2.ts", "other3.ts"] }
const range = test.ranges();
verify.pasteEdits({
args: {
pastedText: [ `const m = t3 + t2 + 1;`],
pasteLocations: [range[0]],
pasteLocations: test.ranges(),
},
newFileContents: {
"/target.ts":
@@ -25,12 +25,12 @@
// @Filename: /tsconfig.json
////{ "files": ["target.ts", "originalFile.ts", "other.ts", "other2.ts", "other3.ts"] }
const range = test.ranges();
const ranges = test.ranges();
verify.pasteEdits({
args: {
pastedText: [ `const m = t3 + t2 + n;` ],
pasteLocations: [range[0]],
copiedFrom: { file: "originalFile.ts", range: [range[1]] },
pasteLocations: [ranges[0]],
copiedFrom: { file: "originalFile.ts", range: [ranges[1]] },
},
newFileContents: {
"/target.ts":
@@ -17,14 +17,13 @@
// @Filename: /tsconfig.json
////{ "files": ["file1.ts", "file2.ts", "target.ts"] }
const range = test.ranges();
const t = range[0];
const ranges = test.ranges();
verify.pasteEdits({
args: {
pastedText: [ `const c = a + b;
const t = 9;`],
pasteLocations: [range[0]],
copiedFrom: { file: "file2.ts", range: [range[1]] },
pasteLocations: [ranges[0]],
copiedFrom: { file: "file2.ts", range: [ranges[1]] },
},
newFileContents: {
"/file2.ts":
@@ -19,13 +19,13 @@
// @Filename: /tsconfig.json
////{ "files": ["file1.ts", "target.ts", "file3.ts"] }
const range = test.ranges();
const ranges = test.ranges();
verify.pasteEdits({
args: {
pastedText: [ `const g = p + q;
function e();
const f = r + s;`],
pasteLocations: [range[0], range[1]],
pasteLocations: [ranges[0], ranges[1]],
},
newFileContents: {
"/target.ts":
@@ -21,13 +21,13 @@
// @Filename: /tsconfig.json
////{ "files": ["file1.ts", "target.ts", "other.ts"] }
const range = test.ranges();
const ranges = test.ranges();
verify.pasteEdits({
args: {
pastedText: [ `export const t = aa + bb + r + s;
const u = 1;`,],
pasteLocations: [range[0], range[1]],
copiedFrom: { file: "file1.ts", range: [range[2]] },
pasteLocations: [ranges[0], ranges[1]],
copiedFrom: { file: "file1.ts", range: [ranges[2]] },
},
newFileContents: {
"/target.ts":
@@ -24,13 +24,13 @@
// @Filename: /tsconfig.json
////{ "files": ["file1.ts", "target.ts", "other.ts"] }
const range = test.ranges();
const ranges = test.ranges();
verify.pasteEdits({
args: {
pastedText: [ `export const t = aa + bb + r + s;
const u = 1;`, `export const k = r + m;`],
pasteLocations: [range[0], range[1]],
copiedFrom: { file: "file1.ts", range: [range[2], range[3]] },
pasteLocations: [ranges[0], ranges[1]],
copiedFrom: { file: "file1.ts", range: [ranges[2], ranges[3]] },
},
newFileContents: {
"/file1.ts":`import { aa, bb } from "./other";
@@ -19,11 +19,11 @@
// @Filename: /tsconfig.json
////{ "files": ["file1.ts", "target.ts", "file3.ts"] }
const range = test.ranges();
const ranges = test.ranges();
verify.pasteEdits({
args: {
pastedText: [ "const g = p + q;", "const f = r + s;"],
pasteLocations: [range[0], range[1], range[2]],
pasteLocations: [ranges[0], ranges[1], ranges[2]],
},
newFileContents: {
"/target.ts":
@@ -0,0 +1,78 @@
/// <reference path="../fourslash.ts" />
// @Filename: /a.ts
//// function foo() {
//// const p = 1;
//// [|console.log("yes");|]
//// }
//// class bar {
//// constructor() {
//// function a() {
//// [|console.log("have a good day");|]
//// }
//// a();
//// function b() {
//// function c() {
//// const test = [|1 + 2|] + 3;
//// }
//// }
//// b();
//// }
//// c() {
//// console.log("hello again");
//// [|function k() {
//// const happy = banana + avocados;
//// }|]
//// }
//// }
// @Filename: /b.ts
//// export const juice = 1;
//// export const sauce = 2;
//// export const fig = 3;
//// export const tomato = 4;
// @Filename: /tsconfig.json
////{ "files": ["a.ts", "b.ts"] }
verify.pasteEdits({
args: {
pastedText: [
`const t = 1 + juice + p;`,`function avacado() { return sauce; }`,
`fig + kiwi`,
`function k() {
const cherry = 3 + tomato + cucumber;
}`
],
pasteLocations: test.ranges(),
},
newFileContents: {
"/a.ts":
`import { juice, sauce, fig, tomato } from "./b";
function foo() {
const p = 1;
const t = 1 + juice + p;
}
class bar {
constructor() {
function a() {
function avacado() { return sauce; }
}
a();
function b() {
function c() {
const test = fig + kiwi + 3;
}
}
b();
}
c() {
console.log("hello again");
function k() {
const cherry = 3 + tomato + cucumber;
}
}
}`
}
});
@@ -0,0 +1,92 @@
/// <reference path="../fourslash.ts" />
// @Filename: /a.ts
//// function foo() {
//// const p = 1;
//// function bar() {
//// console.log([|"Testing"|]);
//// }
//// console.log("yes");
//// }
//// class bar {
//// constructor() {
//// function a() {
//// function aa() {
//// con[|sole.log("have a good day");|]
//// }
////
//// }
//// a();
//// function b() {
//// function c() {
//// export const testing = 1;
//// const test = [|1 + testing + |]3;
//// }
//// }
//// b();
//// }
//// c() {
//// console.log("hello again");
//// [|function k() {
//// const happy = banana + avocados;
//// }|]
//// }
//// }
// @Filename: /b.ts
//// export const juice = 1;
//// export const sauce = 2;
//// export const fig = 3;
//// export const tomato = 4;
// @Filename: /tsconfig.json
////{ "files": ["a.ts", "b.ts"] }
verify.pasteEdits({
args: {
pastedText: [
`juice`,`sole.log(sauce + juice);`,
`fig + kiwi`,
`function k() {
const cherry =tomato + kiwi;
}`
],
pasteLocations: test.ranges(),
},
newFileContents: {
"/a.ts":
`import { sauce, juice, fig, tomato } from "./b";
function foo() {
const p = 1;
function bar() {
console.log(juice);
}
console.log("yes");
}
class bar {
constructor() {
function a() {
function aa() {
console.log(sauce + juice);
}
}
a();
function b() {
function c() {
export const testing = 1;
const test = fig + kiwi3;
}
}
b();
}
c() {
console.log("hello again");
function k() {
const cherry =tomato + kiwi;
}
}
}`
}
});
@@ -0,0 +1,76 @@
/// <reference path="../fourslash.ts" />
// @Filename: /a.ts
//// function foo() {
//// [|console.log("yes");|]
//// }
//// class bar {
//// constructor() {
//// function a() {
//// [|console.log("have a good day");|]
//// }
//// a();
//// function b() {
//// function c() {
//// const test = [|1 + 2|] + 3;
//// }
//// }
//// b();
//// }
//// c() {
//// console.log("hello again");
//// [|function k() {
//// const happy = 1 + banana + avocados;
//// }|]
//// }
//// }
// @Filename: /b.ts
//// export const juice = 1;
//// export const sauce = 2;
//// export const apple = 3;
//// export const tomato = 4;
// @Filename: /tsconfig.json
////{ "files": ["a.ts", "b.ts"] }
verify.pasteEdits({
args: {
pastedText: [
`console.log(juice);`,`function kl() { return sauce; }`,
`apple`,
`function k() {
const cherry = 3 + tomato + cucumber;
}`
],
pasteLocations: test.ranges(),
},
newFileContents: {
"/a.ts":
`import { juice, sauce, tomato } from "./b";
function foo() {
console.log(juice);
}
class bar {
constructor() {
function a() {
function kl() { return sauce; }
}
a();
function b() {
function c() {
const test = apple + 3;
}
}
b();
}
c() {
console.log("hello again");
function k() {
const cherry = 3 + tomato + cucumber;
}
}
}`
}
});
@@ -0,0 +1,73 @@
/// <reference path="../fourslash.ts" />
// @Filename: /a.ts
//// function foo() {
//// console.[|log("Hello");|]
//// }
//// class bar {
//// [|constru|]ctor() {
//// function a() {
//// console.log("hii");
//// }
//// a();
//// function b() {
//// function c() {
//// [|console.log("hola");|]
//// }
//// }
//// b();
//// }
//// c() {
//// console.log("hello again");
//// [||]
//// }
//// }
// @Filename: /b.ts
//// export const juice = 1;
//// export const sauce = 2;
//// export const tomato = 3;
// @Filename: /tsconfig.json
////{ "files": ["a.ts", "b.ts"] }
verify.pasteEdits({
args: {
pastedText: [
`log(sauce);`,`const apple = 1 + juice`,
`const kiwi = 1;`,
`function k() {
const cherry = 3 + tomato + cucumber;
}`
],
pasteLocations: test.ranges(),
},
newFileContents: {
"/a.ts":
`import { sauce, tomato } from "./b";
function foo() {
console.log(sauce);
}
class bar {
const apple = 1 + juicector() {
function a() {
console.log("hii");
}
a();
function b() {
function c() {
const kiwi = 1;
}
}
b();
}
c() {
console.log("hello again");
function k() {
const cherry = 3 + tomato + cucumber;
}
}
}`
}
});
@@ -0,0 +1,77 @@
/// <reference path="../fourslash.ts" />
// @Filename: /a.ts
//// function foo() {
//// [|const p = 1;|]
//// }
//// function too() {
//// function k([|t: string|]) {
//// console.log(t);
//// }
//// }
//// class bar {
//// constructor() {
//// function a() {
//// [| console.log("hello");|]
//// }
//// a();
//// }
//// c() {
//// console.log("hello again");
//// [|function k() {
//// const happy = banana + avocados;
//// }|]
//// }
//// }
// @Filename: /b.ts
//// export const juices = 1;
//// export const sauce = 2;
// @Filename: /c.ts
//// export const figs = 3;
//// export const tomato = 4;
// @Filename: /tsconfig.json
////{ "files": ["a.ts", "b.ts", "c.ts"] }
verify.pasteEdits({
args: {
pastedText: [
`const t = figs;`,`apples : number`,
` console.log(sauce + tomato); `,
`//function k(i:string) {
const cherry = 3 + juices + cucumber;
// }`
],
pasteLocations: test.ranges(),
},
newFileContents: {
"/a.ts":
`import { sauce, juices } from "./b";
import { figs, tomato } from "./c";
function foo() {
const t = figs;
}
function too() {
function k(apples : number) {
console.log(t);
}
}
class bar {
constructor() {
function a() {
console.log(sauce + tomato);
}
a();
}
c() {
console.log("hello again");
//function k(i:string) {
const cherry = 3 + juices + cucumber;
// }
}
}`
}
});
@@ -0,0 +1,77 @@
/// <reference path="../fourslash.ts" />
// @Filename: /a.ts
//// function foo() {
//// [|console.log("Good day");|]
//// }
//// function too() {
//// function k(t: string) {
//// [|console.log("Happy Holidays");|]
//// }
//// }
//// class bar {
//// constructor() {
//// function a() {
//// [| console.log("hello");|]
//// }
//// a();
//// }
//// c() {
//// console.log("hello again");
//// function k[|() {
//// const happy = banana + avocados;
//// }|]
//// }
//// }
// @Filename: /b.ts
//// export const juices = 1;
//// export const sauce = 2;
// @Filename: /c.ts
//// export const figs = 3;
//// export const tomato = 4;
// @Filename: /tsconfig.json
////{ "files": ["a.ts", "b.ts", "c.ts"] }
verify.pasteEdits({
args: {
pastedText: [
`console.log("Good ");`,`const k = figs + juices;`,
` console.log(tomato);`,
`(kiwi: string) {
const cherry=tomato;
}`
],
pasteLocations: test.ranges(),
},
newFileContents: {
"/a.ts":
`import { juices } from "./b";
import { figs, tomato } from "./c";
function foo() {
console.log("Good ");
}
function too() {
function k(t: string) {
const k = figs + juices;
}
}
class bar {
constructor() {
function a() {
console.log(tomato);
}
a();
}
c() {
console.log("hello again");
function k(kiwi: string) {
const cherry=tomato;
}
}
}`
}
});
@@ -11,12 +11,12 @@
// @Filename: /tsconfig.json
////{ "files": ["a.ts", "b.ts"] }
const range = test.ranges();
const ranges = test.ranges();
verify.pasteEdits({
args: {
pastedText: [`export`],
pasteLocations: [range[0]],
copiedFrom: { file: "a.ts", range: [range[1]] },
pasteLocations: [ranges[0]],
copiedFrom: { file: "a.ts", range: [ranges[1]] },
},
newFileContents: {}
});
@@ -0,0 +1,20 @@
/// <reference path="../fourslash.ts" />
// @Filename: /a.ts
//// [||]
// @Filename: /b.ts
//// export const b = 10;
// @Filename: /tsconfig.json
////{ "files": ["a.ts", "b.ts"] }
verify.pasteEdits({
args: {
pastedText: [
`const b = 1;
console.log(b);`],
pasteLocations: test.ranges(),
},
newFileContents: {}
});
@@ -8,7 +8,6 @@
// @Filename: /tsconfig.json
////{ "files": ["target.ts"] }
const range = test.ranges();
verify.pasteEdits({
args: {
pastedText: [ `/**
@@ -17,7 +16,7 @@ verify.pasteEdits({
* line 3
* line 4
*/`],
pasteLocations: [range[0]],
pasteLocations: test.ranges(),
},
newFileContents: {}
});
@@ -10,12 +10,12 @@
// @Filename: /tsconfig.json
////{ "files": ["target.ts"] }
const range = test.ranges();
const ranges = test.ranges();
verify.pasteEdits({
args: {
pastedText: [ `console.log(k);`],
pasteLocations: [range[1]],
copiedFrom: { file: "target.ts", range: [range[0]] },
pasteLocations: [ranges[1]],
copiedFrom: { file: "target.ts", range: [ranges[0]] },
},
newFileContents: {}
});
@@ -17,11 +17,10 @@
// @Filename: /tsconfig.json
////{ "files": ["target.ts", "other.ts", "other2.ts"] }
const range = test.ranges();
verify.pasteEdits({
args: {
pastedText: [ `const m = t2 + 1;`],
pasteLocations: [range[0]],
pasteLocations: test.ranges(),
},
newFileContents: {
"/target.ts":
@@ -14,7 +14,6 @@
// @Filename: /tsconfig.json
////{ "files": ["file1.ts", "file2.ts"] }
const range = test.ranges();
verify.pasteEdits({
args: {
pastedText: [ `interface Testing {
@@ -23,7 +22,7 @@ verify.pasteEdits({
test3: Test3;
test4: Test4;
}`],
pasteLocations: [range[0]],
pasteLocations: test.ranges(),
},
newFileContents: {
"/file2.ts":