File: renameModifiers.ts

package info (click to toggle)
node-typescript 5.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 497,488 kB
  • sloc: javascript: 2,107,274; makefile: 6; sh: 1
file content (36 lines) | stat: -rw-r--r-- 1,704 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/// <reference path='fourslash.ts'/>

////[|[|declare|] [|abstract|] class [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeDelta": -3 |}C1|] {
////    [|[|static|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeDelta": -2 |}a|];|]
////    [|[|readonly|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeDelta": -2 |}b|];|]
////    [|[|public|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeDelta": -2 |}c|];|]
////    [|[|protected|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeDelta": -2 |}d|];|]
////    [|[|private|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeDelta": -2 |}e|];|]
////}|]
////[|[|const|] enum [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeDelta": -2 |}E|] {
////}|]
////[|[|async|] function [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeDelta": -2 |}fn|]() {}|]
////[|[|export|] [|default|] class [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeDelta": -3 |}C2|] {}|]

const [
    class1Def, declareKeyword, abstractKeyword, class1Name,
    aDef, staticKeyword, aName,
    bDef, readonlyKeyword, bName,
    cDef, publicKeyword, cName,
    dDef, protectedKeyword, dName,
    eDef, privateKeyword, eName,
    enumDef, constKeyword, enumName,
    functionDef, asyncKeyword, functionName,
    class2Def, exportKeyword, defaultKeyword, class2Name,
] = test.ranges();
verify.baselineRename([
    declareKeyword, abstractKeyword,
    staticKeyword,
    readonlyKeyword,
    publicKeyword,
    protectedKeyword,
    privateKeyword,
    constKeyword,
    asyncKeyword,
    exportKeyword, defaultKeyword,
]);