1/// <reference path='fourslash.ts'/> 2 3////[|{| "id": "baseDecl" |}class [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "baseDecl" |}Base|] {}|] 4////[|{| "id": "implemented1Decl" |}interface [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "implemented1Decl" |}Implemented1|] {}|] 5////[|{| "id": "classDecl1" |}[|class|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "classDecl1" |}C1|] [|extends|] [|Base|] [|implements|] [|Implemented1|] { 6//// [|{| "id": "getDecl" |}[|get|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "getDecl" |}e|]() { return 1; }|] 7//// [|{| "id": "setDecl" |}[|set|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "setDecl" |}e|](v) {}|] 8////}|] 9////[|{| "id": "interfaceDecl1" |}[|interface|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "interfaceDecl1" |}I1|] [|extends|] [|Base|] { }|] 10////[|{| "id": "typeDecl" |}[|type|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "typeDecl" |}T|] = { }|] 11////[|{| "id": "enumDecl" |}[|enum|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "enumDecl" |}E|] { }|] 12////[|{| "id": "namespaceDecl" |}[|namespace|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "namespaceDecl" |}N|] { }|] 13////[|{| "id": "moduleDecl" |}[|module|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "moduleDecl" |}M|] { }|] 14////[|{| "id": "functionDecl" |}[|function|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "functionDecl" |}fn|]() {}|] 15////[|{| "id": "varDecl" |}[|var|] [|{| "isWriteAccess": false, "isDefinition": true, "contextRangeId": "varDecl" |}x|];|] 16////[|{| "id": "letDecl" |}[|let|] [|{| "isWriteAccess": false, "isDefinition": true, "contextRangeId": "letDecl" |}y|];|] 17////[|{| "id": "constDecl" |}[|const|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "constDecl" |}z|] = 1;|] 18 19const [ 20 baseDecl, 21 baseDecl_name, 22 23 implemented1Decl, 24 implemented1Decl_name, 25 26 classDecl1, 27 classDecl1_classKeyword, 28 classDecl1_name, 29 classDecl1_extendsKeyword, 30 classDecl1_extendsName, 31 classDecl1_implementsKeyword, 32 classDecl1_implementsName, 33 34 getDecl, 35 getDecl_getKeyword, 36 getDecl_name, 37 38 setDecl, 39 setDecl_setKeyword, 40 setDecl_name, 41 42 interfaceDecl1, 43 interfaceDecl1_interfaceKeyword, 44 interfaceDecl1_name, 45 interfaceDecl1_extendsKeyword, 46 interfaceDecl1_extendsName, 47 48 typeDecl, 49 typeDecl_typeKeyword, 50 typeDecl_name, 51 52 enumDecl, 53 enumDecl_enumKeyword, 54 enumDecl_name, 55 56 namespaceDecl, 57 namespaceDecl_namespaceKeyword, 58 namespaceDecl_name, 59 60 moduleDecl, 61 moduleDecl_moduleKeyword, 62 moduleDecl_name, 63 64 functionDecl, 65 functionDecl_functionKeyword, 66 functionDecl_name, 67 68 varDecl, 69 varDecl_varKeyword, 70 varDecl_name, 71 72 letDecl, 73 letDecl_letKeyword, 74 letDecl_name, 75 76 constDecl, 77 constDecl_constKeyword, 78 constDecl_name, 79] = test.ranges(); 80verify.renameLocations(classDecl1_classKeyword, [{ range: classDecl1_name }]); 81verify.renameLocations(classDecl1_extendsKeyword, [{ range: baseDecl_name }, { range: classDecl1_extendsName }, { range: interfaceDecl1_extendsName }]); 82verify.renameLocations(classDecl1_implementsKeyword, [{ range: implemented1Decl_name }, { range: classDecl1_implementsName }]); 83for (const keyword of [getDecl_getKeyword, setDecl_setKeyword]) { 84 verify.renameLocations(keyword, [{ range: getDecl_name }, { range: setDecl_name }]); 85} 86verify.renameLocations(interfaceDecl1_interfaceKeyword, [{ range: interfaceDecl1_name }]); 87verify.renameLocations(interfaceDecl1_extendsKeyword, [{ range: baseDecl_name }, { range: classDecl1_extendsName }, { range: interfaceDecl1_extendsName }]); 88verify.renameLocations(typeDecl_typeKeyword, [{ range: typeDecl_name }]); 89verify.renameLocations(enumDecl_enumKeyword, [{ range: enumDecl_name }]); 90verify.renameLocations(namespaceDecl_namespaceKeyword, [{ range: namespaceDecl_name }]); 91verify.renameLocations(moduleDecl_moduleKeyword, [{ range: moduleDecl_name }]); 92verify.renameLocations(functionDecl_functionKeyword, [{ range: functionDecl_name }]); 93verify.renameLocations(varDecl_varKeyword, [{ range: varDecl_name }]); 94verify.renameLocations(letDecl_letKeyword, [{ range: letDecl_name }]); 95verify.renameLocations(constDecl_constKeyword, [{ range: constDecl_name }]);