Showing preview only (8,016K chars total). Download the full file or copy to clipboard to get everything.
Repository: microsoft/TypeScript-TmLanguage
Branch: master
Commit: eeeb0dc4daa8
Files: 962
Total size: 7.5 MB
Directory structure:
gitextract_wrlgz6ya/
├── .gitattributes
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ └── bug_report.md
│ └── workflows/
│ ├── CI.yml
│ └── accept-baselines.yml
├── .gitignore
├── .vscode/
│ └── settings.json
├── Comments.tmPreferences
├── ErrorList.YAML-tmLanguage
├── FindRefs.YAML-tmLanguage
├── LICENSE.txt
├── README.md
├── SECURITY.md
├── ThirdPartyNotices.txt
├── TypeScript Indent.YAML-tmPreferences
├── TypeScript Indent.tmPreferences
├── TypeScript.YAML-tmLanguage
├── TypeScript.YAML-tmTheme
├── TypeScript.tmLanguage
├── TypeScript.tmTheme
├── TypeScriptReact.YAML-tmLanguage
├── TypeScriptReact.YAML-tmTheme
├── TypeScriptReact.tmLanguage
├── TypeScriptReact.tmTheme
├── build/
│ ├── build.ts
│ ├── index.d.ts
│ └── tsconfig.json
├── package.json
└── tests/
├── baselines/
│ ├── Abstracts.baseline.txt
│ ├── ArrowFunctionInsideTypeAssertion.baseline.txt
│ ├── AsConstSatisfies.baseline.txt
│ ├── Comments.baseline.txt
│ ├── FunctionMethodOverloads.baseline.txt
│ ├── FunctionMethodParameters.baseline.txt
│ ├── FunctionMethodReturnTypes.baseline.txt
│ ├── Issue10.baseline.txt
│ ├── Issue1006.baseline.txt
│ ├── Issue11.baseline.txt
│ ├── Issue110.baseline.txt
│ ├── Issue112.baseline.txt
│ ├── Issue114.baseline.txt
│ ├── Issue115.baseline.txt
│ ├── Issue119.baseline.txt
│ ├── Issue124.baseline.txt
│ ├── Issue131.baseline.txt
│ ├── Issue133.baseline.txt
│ ├── Issue135.baseline.txt
│ ├── Issue139.baseline.txt
│ ├── Issue142.baseline.txt
│ ├── Issue143.baseline.txt
│ ├── Issue146.baseline.txt
│ ├── Issue148.baseline.txt
│ ├── Issue149.baseline.txt
│ ├── Issue152.baseline.txt
│ ├── Issue153.baseline.txt
│ ├── Issue154.baseline.txt
│ ├── Issue155.baseline.txt
│ ├── Issue156.baseline.txt
│ ├── Issue157.baseline.txt
│ ├── Issue158.baseline.txt
│ ├── Issue161.baseline.txt
│ ├── Issue163.baseline.txt
│ ├── Issue166.baseline.txt
│ ├── Issue171.baseline.txt
│ ├── Issue172.baseline.txt
│ ├── Issue175.baseline.txt
│ ├── Issue177.baseline.txt
│ ├── Issue178.baseline.txt
│ ├── Issue180.baseline.txt
│ ├── Issue182.baseline.txt
│ ├── Issue183.baseline.txt
│ ├── Issue186.baseline.txt
│ ├── Issue187.baseline.txt
│ ├── Issue191.baseline.txt
│ ├── Issue193.baseline.txt
│ ├── Issue197.baseline.txt
│ ├── Issue198.baseline.txt
│ ├── Issue200.baseline.txt
│ ├── Issue202.baseline.txt
│ ├── Issue203.baseline.txt
│ ├── Issue206.baseline.txt
│ ├── Issue208.baseline.txt
│ ├── Issue212.baseline.txt
│ ├── Issue215.baseline.txt
│ ├── Issue216.baseline.txt
│ ├── Issue217.baseline.txt
│ ├── Issue218.baseline.txt
│ ├── Issue219.baseline.txt
│ ├── Issue22.baseline.txt
│ ├── Issue221.baseline.txt
│ ├── Issue223.baseline.txt
│ ├── Issue226.baseline.txt
│ ├── Issue230.baseline.txt
│ ├── Issue232.baseline.txt
│ ├── Issue235.baseline.txt
│ ├── Issue236.baseline.txt
│ ├── Issue237.baseline.txt
│ ├── Issue239.baseline.txt
│ ├── Issue241.baseline.txt
│ ├── Issue243.baseline.txt
│ ├── Issue244.baseline.txt
│ ├── Issue247.baseline.txt
│ ├── Issue248.baseline.txt
│ ├── Issue249.baseline.txt
│ ├── Issue250.baseline.txt
│ ├── Issue251.baseline.txt
│ ├── Issue252.baseline.txt
│ ├── Issue262.baseline.txt
│ ├── Issue264.baseline.txt
│ ├── Issue276.baseline.txt
│ ├── Issue28.baseline.txt
│ ├── Issue280.baseline.txt
│ ├── Issue283.baseline.txt
│ ├── Issue285.baseline.txt
│ ├── Issue288.baseline.txt
│ ├── Issue292.baseline.txt
│ ├── Issue294.baseline.txt
│ ├── Issue3.baseline.txt
│ ├── Issue304.baseline.txt
│ ├── Issue305.baseline.txt
│ ├── Issue307.baseline.txt
│ ├── Issue314.baseline.txt
│ ├── Issue318.baseline.txt
│ ├── Issue32.baseline.txt
│ ├── Issue321.baseline.txt
│ ├── Issue322.baseline.txt
│ ├── Issue326.baseline.txt
│ ├── Issue334.baseline.txt
│ ├── Issue335.baseline.txt
│ ├── Issue337.baseline.txt
│ ├── Issue338.baseline.txt
│ ├── Issue339.baseline.txt
│ ├── Issue343.baseline.txt
│ ├── Issue344.baseline.txt
│ ├── Issue346.baseline.txt
│ ├── Issue347.baseline.txt
│ ├── Issue351.baseline.txt
│ ├── Issue356.baseline.txt
│ ├── Issue357.baseline.txt
│ ├── Issue359.baseline.txt
│ ├── Issue36.baseline.txt
│ ├── Issue361.baseline.txt
│ ├── Issue365.baseline.txt
│ ├── Issue366.baseline.txt
│ ├── Issue368.baseline.txt
│ ├── Issue37.baseline.txt
│ ├── Issue375.baseline.txt
│ ├── Issue376.baseline.txt
│ ├── Issue377.baseline.txt
│ ├── Issue379.baseline.txt
│ ├── Issue380.baseline.txt
│ ├── Issue381.baseline.txt
│ ├── Issue382.baseline.txt
│ ├── Issue383.baseline.txt
│ ├── Issue384.baseline.txt
│ ├── Issue387.baseline.txt
│ ├── Issue388.baseline.txt
│ ├── Issue389.baseline.txt
│ ├── Issue391.baseline.txt
│ ├── Issue393.baseline.txt
│ ├── Issue394.baseline.txt
│ ├── Issue396.baseline.txt
│ ├── Issue397.baseline.txt
│ ├── Issue398.baseline.txt
│ ├── Issue402.baseline.txt
│ ├── Issue403IncorrectlyDetectedArrowTypeParameters.baseline.txt
│ ├── Issue403IncorrectlyDetectedFunctionCallAsArrow.baseline.txt
│ ├── Issue405.baseline.txt
│ ├── Issue407.baseline.txt
│ ├── Issue408.baseline.txt
│ ├── Issue415.baseline.txt
│ ├── Issue417.baseline.txt
│ ├── Issue418.baseline.txt
│ ├── Issue42.baseline.txt
│ ├── Issue420.baseline.txt
│ ├── Issue421.baseline.txt
│ ├── Issue423.baseline.txt
│ ├── Issue427.baseline.txt
│ ├── Issue428.baseline.txt
│ ├── Issue43.baseline.txt
│ ├── Issue430.baseline.txt
│ ├── Issue431.baseline.txt
│ ├── Issue433.baseline.txt
│ ├── Issue434.baseline.txt
│ ├── Issue435.baseline.txt
│ ├── Issue44.baseline.txt
│ ├── Issue441.baseline.txt
│ ├── Issue444.baseline.txt
│ ├── Issue445.baseline.txt
│ ├── Issue450.baseline.txt
│ ├── Issue452.baseline.txt
│ ├── Issue453.baseline.txt
│ ├── Issue455.baseline.txt
│ ├── Issue458.baseline.txt
│ ├── Issue460.baseline.txt
│ ├── Issue461.baseline.txt
│ ├── Issue463.baseline.txt
│ ├── Issue466.baseline.txt
│ ├── Issue468.baseline.txt
│ ├── Issue470.baseline.txt
│ ├── Issue471.baseline.txt
│ ├── Issue472.baseline.txt
│ ├── Issue476.baseline.txt
│ ├── Issue477.baseline.txt
│ ├── Issue478.baseline.txt
│ ├── Issue480.baseline.txt
│ ├── Issue482.baseline.txt
│ ├── Issue484.baseline.txt
│ ├── Issue485.baseline.txt
│ ├── Issue486.baseline.txt
│ ├── Issue491.baseline.txt
│ ├── Issue496.baseline.txt
│ ├── Issue499.baseline.txt
│ ├── Issue5.baseline.txt
│ ├── Issue500.baseline.txt
│ ├── Issue502.baseline.txt
│ ├── Issue506.baseline.txt
│ ├── Issue510.baseline.txt
│ ├── Issue513.baseline.txt
│ ├── Issue515.baseline.txt
│ ├── Issue518.baseline.txt
│ ├── Issue521.baseline.txt
│ ├── Issue522.baseline.txt
│ ├── Issue525.baseline.txt
│ ├── Issue526.baseline.txt
│ ├── Issue530.baseline.txt
│ ├── Issue531.baseline.txt
│ ├── Issue536.baseline.txt
│ ├── Issue538.baseline.txt
│ ├── Issue540.baseline.txt
│ ├── Issue543.baseline.txt
│ ├── Issue549.baseline.txt
│ ├── Issue550.baseline.txt
│ ├── Issue551.baseline.txt
│ ├── Issue554.baseline.txt
│ ├── Issue556.baseline.txt
│ ├── Issue558.baseline.txt
│ ├── Issue559.baseline.txt
│ ├── Issue562.baseline.txt
│ ├── Issue566.baseline.txt
│ ├── Issue567.baseline.txt
│ ├── Issue569.baseline.txt
│ ├── Issue571.baseline.txt
│ ├── Issue572.baseline.txt
│ ├── Issue572ForLoop.baseline.txt
│ ├── Issue575.baseline.txt
│ ├── Issue578.baseline.txt
│ ├── Issue579.baseline.txt
│ ├── Issue580.baseline.txt
│ ├── Issue581.baseline.txt
│ ├── Issue584.baseline.txt
│ ├── Issue585.baseline.txt
│ ├── Issue586.baseline.txt
│ ├── Issue59.baseline.txt
│ ├── Issue590.baseline.txt
│ ├── Issue591.baseline.txt
│ ├── Issue592.baseline.txt
│ ├── Issue595.baseline.txt
│ ├── Issue598.baseline.txt
│ ├── Issue601.baseline.txt
│ ├── Issue602.baseline.txt
│ ├── Issue604.baseline.txt
│ ├── Issue605.baseline.txt
│ ├── Issue606.baseline.txt
│ ├── Issue607.baseline.txt
│ ├── Issue608.baseline.txt
│ ├── Issue609.baseline.txt
│ ├── Issue610.baseline.txt
│ ├── Issue612.baseline.txt
│ ├── Issue613.baseline.txt
│ ├── Issue616.baseline.txt
│ ├── Issue62.baseline.txt
│ ├── Issue623.baseline.txt
│ ├── Issue624.baseline.txt
│ ├── Issue625.baseline.txt
│ ├── Issue626.baseline.txt
│ ├── Issue628.baseline.txt
│ ├── Issue629.baseline.txt
│ ├── Issue63.baseline.txt
│ ├── Issue632.baseline.txt
│ ├── Issue634.baseline.txt
│ ├── Issue635.baseline.txt
│ ├── Issue636.baseline.txt
│ ├── Issue637.baseline.txt
│ ├── Issue637a.baseline.txt
│ ├── Issue637b.baseline.txt
│ ├── Issue638.baseline.txt
│ ├── Issue639.baseline.txt
│ ├── Issue64.baseline.txt
│ ├── Issue642.baseline.txt
│ ├── Issue643.baseline.txt
│ ├── Issue646.baseline.txt
│ ├── Issue647.baseline.txt
│ ├── Issue65.baseline.txt
│ ├── Issue650.baseline.txt
│ ├── Issue651.baseline.txt
│ ├── Issue652.baseline.txt
│ ├── Issue653.baseline.txt
│ ├── Issue654.baseline.txt
│ ├── Issue66.baseline.txt
│ ├── Issue661.baseline.txt
│ ├── Issue662.baseline.txt
│ ├── Issue663.baseline.txt
│ ├── Issue665.baseline.txt
│ ├── Issue666.baseline.txt
│ ├── Issue667.baseline.txt
│ ├── Issue668.baseline.txt
│ ├── Issue670.baseline.txt
│ ├── Issue672.baseline.txt
│ ├── Issue673.baseline.txt
│ ├── Issue674.baseline.txt
│ ├── Issue675.baseline.txt
│ ├── Issue677.baseline.txt
│ ├── Issue677arrow.baseline.txt
│ ├── Issue683.baseline.txt
│ ├── Issue684.baseline.txt
│ ├── Issue685.baseline.txt
│ ├── Issue686.baseline.txt
│ ├── Issue687.baseline.txt
│ ├── Issue688.baseline.txt
│ ├── Issue689.baseline.txt
│ ├── Issue692.baseline.txt
│ ├── Issue695.baseline.txt
│ ├── Issue698.baseline.txt
│ ├── Issue701.baseline.txt
│ ├── Issue702.baseline.txt
│ ├── Issue711.baseline.txt
│ ├── Issue715.baseline.txt
│ ├── Issue717.baseline.txt
│ ├── Issue720.baseline.txt
│ ├── Issue721.baseline.txt
│ ├── Issue724.baseline.txt
│ ├── Issue727.baseline.txt
│ ├── Issue728.baseline.txt
│ ├── Issue730.baseline.txt
│ ├── Issue732.baseline.txt
│ ├── Issue737.baseline.txt
│ ├── Issue741.baseline.txt
│ ├── Issue743.baseline.txt
│ ├── Issue744.baseline.txt
│ ├── Issue748.baseline.txt
│ ├── Issue750.baseline.txt
│ ├── Issue751.baseline.txt
│ ├── Issue754.baseline.txt
│ ├── Issue756.baseline.txt
│ ├── Issue760.baseline.txt
│ ├── Issue762.baseline.txt
│ ├── Issue763.baseline.txt
│ ├── Issue766.baseline.txt
│ ├── Issue77.baseline.txt
│ ├── Issue774.baseline.txt
│ ├── Issue780.baseline.txt
│ ├── Issue782.baseline.txt
│ ├── Issue785.baseline.txt
│ ├── Issue786.baseline.txt
│ ├── Issue787.baseline.txt
│ ├── Issue790.baseline.txt
│ ├── Issue791.baseline.txt
│ ├── Issue793.baseline.txt
│ ├── Issue794.baseline.txt
│ ├── Issue796.baseline.txt
│ ├── Issue797.baseline.txt
│ ├── Issue811.baseline.txt
│ ├── Issue816.baseline.txt
│ ├── Issue82.baseline.txt
│ ├── Issue822.baseline.txt
│ ├── Issue823.baseline.txt
│ ├── Issue832.baseline.txt
│ ├── Issue836.baseline.txt
│ ├── Issue840.baseline.txt
│ ├── Issue841.baseline.txt
│ ├── Issue844.baseline.txt
│ ├── Issue846.baseline.txt
│ ├── Issue850.baseline.txt
│ ├── Issue858.baseline.txt
│ ├── Issue868.baseline.txt
│ ├── Issue87.baseline.txt
│ ├── Issue870.baseline.txt
│ ├── Issue88.baseline.txt
│ ├── Issue89.baseline.txt
│ ├── Issue90.baseline.txt
│ ├── Issue921.baseline.txt
│ ├── Issue923.baseline.txt
│ ├── Issue924.baseline.txt
│ ├── Issue96.baseline.txt
│ ├── Issue964.baseline.txt
│ ├── Issue975.baseline.txt
│ ├── Issues573.baseline.txt
│ ├── Issues597.baseline.txt
│ ├── Issues648.baseline.txt
│ ├── Issues649.baseline.txt
│ ├── ParameterProperties.baseline.txt
│ ├── SyntacticallyIncorrectStrings.baseline.txt
│ ├── TsxSamples.baseline.txt
│ ├── arbitraryModuleNamespaceIdentifiers.baseline.txt
│ ├── arrow.baseline.txt
│ ├── arrowInsideCall.baseline.txt
│ ├── assertions.baseline.txt
│ ├── autoAccessor.baseline.txt
│ ├── awaitColoring.baseline.txt
│ ├── awaitUsedInExpression.baseline.txt
│ ├── awaitUsing.baseline.txt
│ ├── awaited.baseline.txt
│ ├── bigint.baseline.txt
│ ├── binder.baseline.txt
│ ├── conditionalTypes.baseline.txt
│ ├── constType.baseline.txt
│ ├── constTypeAssert.baseline.txt
│ ├── constTypeParameter.baseline.txt
│ ├── constants.baseline.txt
│ ├── constructorType.baseline.txt
│ ├── destructuringWithDefaults.baseline.txt
│ ├── directives.baseline.txt
│ ├── docComments.baseline.txt
│ ├── enumMemberWithIntializer.baseline.txt
│ ├── enumMemberWithQuotedMemberName.baseline.txt
│ ├── exportDeclarations.baseline.txt
│ ├── forof.baseline.txt
│ ├── generator.baseline.txt
│ ├── genericTaggedTemplate.baseline.txt
│ ├── importAssert.baseline.txt
│ ├── importTypeOnly.baseline.txt
│ ├── importTypes.baseline.txt
│ ├── inferTypes.baseline.txt
│ ├── intrinsic.baseline.txt
│ ├── issue1005.baseline.txt
│ ├── issue327.baseline.txt
│ ├── issue522_1.baseline.txt
│ ├── issue534.baseline.txt
│ ├── issue776.baseline.txt
│ ├── issue806.baseline.txt
│ ├── issue807.baseline.txt
│ ├── issue807ts.baseline.txt
│ ├── issue809.baseline.txt
│ ├── issue812.baseline.txt
│ ├── issue814.baseline.txt
│ ├── issue824.baseline.txt
│ ├── issue907.baseline.txt
│ ├── issue909.baseline.txt
│ ├── issue916.baseline.txt
│ ├── issue927.baseline.txt
│ ├── issue930.baseline.txt
│ ├── issue932.baseline.txt
│ ├── issue935.baseline.txt
│ ├── issue940.baseline.txt
│ ├── issue948.baseline.txt
│ ├── issue949.baseline.txt
│ ├── issue951.baseline.txt
│ ├── issue957.baseline.txt
│ ├── issue971.baseline.txt
│ ├── javascript.baseline.txt
│ ├── javascriptClasses.baseline.txt
│ ├── jsdocProperty.baseline.txt
│ ├── jsdocType.baseline.txt
│ ├── jsxTagWithTypeArguments.baseline.txt
│ ├── keyof.baseline.txt
│ ├── mappedType.baseline.txt
│ ├── modifierOperators.baseline.txt
│ ├── multilineArrow.baseline.txt
│ ├── multilineDestructuringParametersOfArrow.baseline.txt
│ ├── multineTag.baseline.txt
│ ├── multipleVariableDeclaration.baseline.txt
│ ├── namedTuples.baseline.txt
│ ├── namespaceAndModule.baseline.txt
│ ├── notMultilineArrow1.baseline.txt
│ ├── notMultilineArrow2.baseline.txt
│ ├── notMultilineArrow3.baseline.txt
│ ├── numeric.baseline.txt
│ ├── numericAsType.baseline.txt
│ ├── objectLiteral.baseline.txt
│ ├── objectLiteralWithCast.baseline.txt
│ ├── objectType.baseline.txt
│ ├── optionalChaining.baseline.txt
│ ├── parameterBindingPattern.baseline.txt
│ ├── partialTypeArguments.baseline.txt
│ ├── pr48_noSemiColon.baseline.txt
│ ├── pr557_namespacedJsx.baseline.txt
│ ├── privateFields.baseline.txt
│ ├── property.baseline.txt
│ ├── propertyNameInObjectBindingElement.baseline.txt
│ ├── readonly.baseline.txt
│ ├── readonlyModifier.baseline.txt
│ ├── regexp.baseline.txt
│ ├── resolutionMode.baseline.txt
│ ├── restAndSpreadExpression.baseline.txt
│ ├── restInBindingPattern.baseline.txt
│ ├── satisfies.baseline.txt
│ ├── specialNew.baseline.txt
│ ├── templateLiteralType.baseline.txt
│ ├── typeofClass.baseline.txt
│ ├── typeparameterDefault.baseline.txt
│ ├── using.baseline.txt
│ ├── variableBindingPattern.baseline.txt
│ └── varianceAnnotations.baseline.txt
├── build.ts
├── cases/
│ ├── Abstracts.ts
│ ├── ArrowFunctionInsideTypeAssertion.ts
│ ├── AsConstSatisfies.ts
│ ├── Comments.ts
│ ├── FunctionMethodOverloads.ts
│ ├── FunctionMethodParameters.ts
│ ├── FunctionMethodReturnTypes.ts
│ ├── Issue10.ts
│ ├── Issue1006.ts
│ ├── Issue11.ts
│ ├── Issue110.ts
│ ├── Issue112.ts
│ ├── Issue114.ts
│ ├── Issue115.ts
│ ├── Issue119.ts
│ ├── Issue124.ts
│ ├── Issue131.ts
│ ├── Issue133.ts
│ ├── Issue135.ts
│ ├── Issue139.ts
│ ├── Issue142.ts
│ ├── Issue143.ts
│ ├── Issue146.ts
│ ├── Issue148.ts
│ ├── Issue149.ts
│ ├── Issue152.ts
│ ├── Issue153.ts
│ ├── Issue154.ts
│ ├── Issue155.ts
│ ├── Issue156.ts
│ ├── Issue157.ts
│ ├── Issue158.ts
│ ├── Issue161.tsx
│ ├── Issue163.ts
│ ├── Issue166.ts
│ ├── Issue171.ts
│ ├── Issue172.ts
│ ├── Issue175.ts
│ ├── Issue177.ts
│ ├── Issue178.ts
│ ├── Issue180.ts
│ ├── Issue182.ts
│ ├── Issue183.ts
│ ├── Issue186.ts
│ ├── Issue187.ts
│ ├── Issue191.ts
│ ├── Issue193.ts
│ ├── Issue197.ts
│ ├── Issue198.ts
│ ├── Issue200.ts
│ ├── Issue202.tsx
│ ├── Issue203.ts
│ ├── Issue206.ts
│ ├── Issue208.ts
│ ├── Issue212.ts
│ ├── Issue215.ts
│ ├── Issue216.ts
│ ├── Issue217.ts
│ ├── Issue218.ts
│ ├── Issue219.ts
│ ├── Issue22.ts
│ ├── Issue221.ts
│ ├── Issue223.ts
│ ├── Issue226.ts
│ ├── Issue230.ts
│ ├── Issue232.ts
│ ├── Issue235.ts
│ ├── Issue236.ts
│ ├── Issue237.ts
│ ├── Issue239.tsx
│ ├── Issue241.ts
│ ├── Issue243.ts
│ ├── Issue244.ts
│ ├── Issue247.tsx
│ ├── Issue248.ts
│ ├── Issue249.ts
│ ├── Issue250.ts
│ ├── Issue251.ts
│ ├── Issue252.ts
│ ├── Issue262.ts
│ ├── Issue264.tsx
│ ├── Issue276.ts
│ ├── Issue28.ts
│ ├── Issue280.tsx
│ ├── Issue283.tsx
│ ├── Issue285.ts
│ ├── Issue288.ts
│ ├── Issue292.ts
│ ├── Issue294.ts
│ ├── Issue3.ts
│ ├── Issue304.ts
│ ├── Issue305.ts
│ ├── Issue307.ts
│ ├── Issue314.ts
│ ├── Issue318.ts
│ ├── Issue32.ts
│ ├── Issue321.ts
│ ├── Issue322.ts
│ ├── Issue326.ts
│ ├── Issue334.ts
│ ├── Issue335.ts
│ ├── Issue337.ts
│ ├── Issue338.ts
│ ├── Issue339.ts
│ ├── Issue343.ts
│ ├── Issue344.tsx
│ ├── Issue346.ts
│ ├── Issue347.ts
│ ├── Issue351.tsx
│ ├── Issue356.ts
│ ├── Issue357.tsx
│ ├── Issue359.ts
│ ├── Issue36.ts
│ ├── Issue361.ts
│ ├── Issue365.ts
│ ├── Issue366.ts
│ ├── Issue368.ts
│ ├── Issue37.ts
│ ├── Issue375.ts
│ ├── Issue376.ts
│ ├── Issue377.ts
│ ├── Issue379.ts
│ ├── Issue380.ts
│ ├── Issue381.ts
│ ├── Issue382.ts
│ ├── Issue383.tsx
│ ├── Issue384.ts
│ ├── Issue387.ts
│ ├── Issue388.ts
│ ├── Issue389.ts
│ ├── Issue391.ts
│ ├── Issue393.ts
│ ├── Issue394.ts
│ ├── Issue396.ts
│ ├── Issue397.ts
│ ├── Issue398.ts
│ ├── Issue402.ts
│ ├── Issue403IncorrectlyDetectedArrowTypeParameters.ts
│ ├── Issue403IncorrectlyDetectedFunctionCallAsArrow.ts
│ ├── Issue405.ts
│ ├── Issue407.ts
│ ├── Issue408.ts
│ ├── Issue415.tsx
│ ├── Issue417.ts
│ ├── Issue418.ts
│ ├── Issue42.ts
│ ├── Issue420.ts
│ ├── Issue421.ts
│ ├── Issue423.ts
│ ├── Issue427.ts
│ ├── Issue428.ts
│ ├── Issue43.ts
│ ├── Issue430.tsx
│ ├── Issue431.ts
│ ├── Issue433.ts
│ ├── Issue434.ts
│ ├── Issue435.ts
│ ├── Issue44.ts
│ ├── Issue441.ts
│ ├── Issue444.ts
│ ├── Issue445.ts
│ ├── Issue450.ts
│ ├── Issue452.ts
│ ├── Issue453.ts
│ ├── Issue455.ts
│ ├── Issue458.ts
│ ├── Issue460.ts
│ ├── Issue461.tsx
│ ├── Issue463.ts
│ ├── Issue466.ts
│ ├── Issue468.ts
│ ├── Issue470.ts
│ ├── Issue471.ts
│ ├── Issue472.ts
│ ├── Issue476.ts
│ ├── Issue477.ts
│ ├── Issue478.tsx
│ ├── Issue480.ts
│ ├── Issue482.ts
│ ├── Issue484.ts
│ ├── Issue485.ts
│ ├── Issue486.ts
│ ├── Issue491.ts
│ ├── Issue496.ts
│ ├── Issue499.ts
│ ├── Issue5.ts
│ ├── Issue500.ts
│ ├── Issue502.ts
│ ├── Issue506.ts
│ ├── Issue510.ts
│ ├── Issue513.ts
│ ├── Issue515.ts
│ ├── Issue518.tsx
│ ├── Issue521.ts
│ ├── Issue522.ts
│ ├── Issue525.ts
│ ├── Issue526.ts
│ ├── Issue530.ts
│ ├── Issue531.ts
│ ├── Issue536.ts
│ ├── Issue538.ts
│ ├── Issue540.ts
│ ├── Issue543.ts
│ ├── Issue549.ts
│ ├── Issue550.ts
│ ├── Issue551.ts
│ ├── Issue554.ts
│ ├── Issue556.ts
│ ├── Issue558.ts
│ ├── Issue559.ts
│ ├── Issue562.ts
│ ├── Issue566.ts
│ ├── Issue567.ts
│ ├── Issue569.ts
│ ├── Issue571.ts
│ ├── Issue572.ts
│ ├── Issue572ForLoop.ts
│ ├── Issue575.ts
│ ├── Issue578.ts
│ ├── Issue579.ts
│ ├── Issue580.ts
│ ├── Issue581.ts
│ ├── Issue584.ts
│ ├── Issue585.tsx
│ ├── Issue586.ts
│ ├── Issue59.ts
│ ├── Issue590.ts
│ ├── Issue591.ts
│ ├── Issue592.ts
│ ├── Issue595.ts
│ ├── Issue598.ts
│ ├── Issue601.ts
│ ├── Issue602.ts
│ ├── Issue604.ts
│ ├── Issue605.ts
│ ├── Issue606.tsx
│ ├── Issue607.ts
│ ├── Issue608.ts
│ ├── Issue609.ts
│ ├── Issue610.ts
│ ├── Issue612.ts
│ ├── Issue613.ts
│ ├── Issue616.ts
│ ├── Issue62.ts
│ ├── Issue623.ts
│ ├── Issue624.tsx
│ ├── Issue625.ts
│ ├── Issue626.ts
│ ├── Issue628.ts
│ ├── Issue629.ts
│ ├── Issue63.ts
│ ├── Issue632.tsx
│ ├── Issue634.ts
│ ├── Issue635.ts
│ ├── Issue636.tsx
│ ├── Issue637.ts
│ ├── Issue637a.ts
│ ├── Issue637b.tsx
│ ├── Issue638.ts
│ ├── Issue639.ts
│ ├── Issue64.ts
│ ├── Issue642.ts
│ ├── Issue643.ts
│ ├── Issue646.ts
│ ├── Issue647.ts
│ ├── Issue65.ts
│ ├── Issue650.ts
│ ├── Issue651.ts
│ ├── Issue652.ts
│ ├── Issue653.ts
│ ├── Issue654.ts
│ ├── Issue66.tsx
│ ├── Issue661.ts
│ ├── Issue662.ts
│ ├── Issue663.ts
│ ├── Issue665.ts
│ ├── Issue666.ts
│ ├── Issue667.tsx
│ ├── Issue668.ts
│ ├── Issue670.ts
│ ├── Issue672.ts
│ ├── Issue673.ts
│ ├── Issue674.ts
│ ├── Issue675.ts
│ ├── Issue677.ts
│ ├── Issue677arrow.ts
│ ├── Issue683.ts
│ ├── Issue684.ts
│ ├── Issue685.ts
│ ├── Issue686.ts
│ ├── Issue687.ts
│ ├── Issue688.ts
│ ├── Issue689.ts
│ ├── Issue692.ts
│ ├── Issue695.ts
│ ├── Issue698.ts
│ ├── Issue701.ts
│ ├── Issue702.ts
│ ├── Issue711.ts
│ ├── Issue715.ts
│ ├── Issue717.ts
│ ├── Issue720.ts
│ ├── Issue721.ts
│ ├── Issue724.ts
│ ├── Issue727.ts
│ ├── Issue728.ts
│ ├── Issue730.ts
│ ├── Issue732.ts
│ ├── Issue737.ts
│ ├── Issue741.ts
│ ├── Issue743.ts
│ ├── Issue744.ts
│ ├── Issue748.ts
│ ├── Issue750.ts
│ ├── Issue751.ts
│ ├── Issue754.tsx
│ ├── Issue756.ts
│ ├── Issue760.ts
│ ├── Issue762.ts
│ ├── Issue763.ts
│ ├── Issue766.ts
│ ├── Issue77.ts
│ ├── Issue774.ts
│ ├── Issue780.ts
│ ├── Issue782.ts
│ ├── Issue785.ts
│ ├── Issue786.ts
│ ├── Issue787.ts
│ ├── Issue790.ts
│ ├── Issue791.ts
│ ├── Issue793.ts
│ ├── Issue794.tsx
│ ├── Issue796.ts
│ ├── Issue797.ts
│ ├── Issue811.tsx
│ ├── Issue816.ts
│ ├── Issue82.ts
│ ├── Issue822.ts
│ ├── Issue823.ts
│ ├── Issue832.ts
│ ├── Issue836.ts
│ ├── Issue840.ts
│ ├── Issue841.ts
│ ├── Issue844.ts
│ ├── Issue846.ts
│ ├── Issue850.ts
│ ├── Issue858.ts
│ ├── Issue868.ts
│ ├── Issue87.ts
│ ├── Issue870.ts
│ ├── Issue88.tsx
│ ├── Issue89.ts
│ ├── Issue90.ts
│ ├── Issue921.ts
│ ├── Issue923.ts
│ ├── Issue924.tsx
│ ├── Issue96.ts
│ ├── Issue964.ts
│ ├── Issue975.ts
│ ├── Issues573.ts
│ ├── Issues597.ts
│ ├── Issues648.tsx
│ ├── Issues649.tsx
│ ├── ParameterProperties.ts
│ ├── SyntacticallyIncorrectStrings.ts
│ ├── TsxSamples.tsx
│ ├── arbitraryModuleNamespaceIdentifiers.ts
│ ├── arrow.ts
│ ├── arrowInsideCall.ts
│ ├── assertions.ts
│ ├── autoAccessor.ts
│ ├── awaitColoring.ts
│ ├── awaitUsedInExpression.ts
│ ├── awaitUsing.ts
│ ├── awaited.ts
│ ├── bigint.ts
│ ├── binder.ts
│ ├── conditionalTypes.ts
│ ├── constType.ts
│ ├── constTypeAssert.ts
│ ├── constTypeParameter.ts
│ ├── constants.ts
│ ├── constructorType.ts
│ ├── destructuringWithDefaults.ts
│ ├── directives.ts
│ ├── docComments.ts
│ ├── enumMemberWithIntializer.ts
│ ├── enumMemberWithQuotedMemberName.ts
│ ├── exportDeclarations.ts
│ ├── forof.ts
│ ├── generator.ts
│ ├── genericTaggedTemplate.ts
│ ├── importAssert.ts
│ ├── importTypeOnly.ts
│ ├── importTypes.ts
│ ├── inferTypes.ts
│ ├── intrinsic.ts
│ ├── issue1005.ts
│ ├── issue327.ts
│ ├── issue522_1.ts
│ ├── issue534.tsx
│ ├── issue776.ts
│ ├── issue806.ts
│ ├── issue807.tsx
│ ├── issue807ts.ts
│ ├── issue809.ts
│ ├── issue812.ts
│ ├── issue814.ts
│ ├── issue824.ts
│ ├── issue907.ts
│ ├── issue909.ts
│ ├── issue916.ts
│ ├── issue927.ts
│ ├── issue930.ts
│ ├── issue932.ts
│ ├── issue935.ts
│ ├── issue940.ts
│ ├── issue948.ts
│ ├── issue949.ts
│ ├── issue951.ts
│ ├── issue957.ts
│ ├── issue971.ts
│ ├── javascript.ts
│ ├── javascriptClasses.ts
│ ├── jsdocProperty.ts
│ ├── jsdocType.ts
│ ├── jsxTagWithTypeArguments.tsx
│ ├── keyof.ts
│ ├── mappedType.ts
│ ├── modifierOperators.ts
│ ├── multilineArrow.ts
│ ├── multilineDestructuringParametersOfArrow.ts
│ ├── multineTag.tsx
│ ├── multipleVariableDeclaration.ts
│ ├── namedTuples.ts
│ ├── namespaceAndModule.ts
│ ├── notMultilineArrow1.ts
│ ├── notMultilineArrow2.ts
│ ├── notMultilineArrow3.ts
│ ├── numeric.ts
│ ├── numericAsType.ts
│ ├── objectLiteral.ts
│ ├── objectLiteralWithCast.ts
│ ├── objectType.ts
│ ├── optionalChaining.ts
│ ├── parameterBindingPattern.ts
│ ├── partialTypeArguments.ts
│ ├── pr48_noSemiColon.ts
│ ├── pr557_namespacedJsx.tsx
│ ├── privateFields.ts
│ ├── property.ts
│ ├── propertyNameInObjectBindingElement.ts
│ ├── readonly.ts
│ ├── readonlyModifier.ts
│ ├── regexp.ts
│ ├── resolutionMode.ts
│ ├── restAndSpreadExpression.ts
│ ├── restInBindingPattern.ts
│ ├── satisfies.ts
│ ├── specialNew.ts
│ ├── templateLiteralType.ts
│ ├── typeofClass.ts
│ ├── typeparameterDefault.ts
│ ├── using.ts
│ ├── variableBindingPattern.ts
│ └── varianceAnnotations.ts
├── test.ts
└── tsconfig.json
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitattributes
================================================
# Make sure baseline files have consistent line endings
*.txt text eol=lf
# Override classification
*.YAML-tmLanguage linguist-language=YAML
*.YAML-tmTheme linguist-language=YAML
*.YAML-tmPreferences linguist-language=YAML
================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
**[JavaScript and TypeScript Nightly](https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-typescript-next) version:**
**Code**
```ts
// Please include a code snippet that demonstrates the issue
```
================================================
FILE: .github/workflows/CI.yml
================================================
name: CI
on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master
jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
# Test the latest version of Node.js plus the last two LTS versions.
node-version:
- "*"
- lts/*
- lts/-1
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Use node version ${{ matrix.node-version }}
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: ${{ matrix.node-version }}
check-latest: true
- run: npm i
- run: npm test
================================================
FILE: .github/workflows/accept-baselines.yml
================================================
name: Accept Baselines
on:
workflow_dispatch: {}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
- name: Configure Git, Run Tests, Update Baselines
run: |
git config user.email "typescriptbot@microsoft.com"
git config user.name "TypeScript Bot"
npm install
git rm -r --quiet tests/baselines
npm test
npm run accept
git add ./tests/baselines
git diff --cached
git commit -m "Update Baselines"
git push
================================================
FILE: .gitignore
================================================
node_modules
build/*.js
tests/*.js
tests/generated/*
xunit.xml
*.tsbuildinfo
================================================
FILE: .vscode/settings.json
================================================
// Place your settings in this file to overwrite default and user settings.
{
"editor.insertSpaces": true,
"files.associations": {
"*.YAML-tmLanguage": "yaml",
"*.YAML-tmPreferences": "yaml",
"*.YAML-tmTheme": "yaml"
}
}
================================================
FILE: Comments.tmPreferences
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Comments</string>
<key>scope</key>
<string>source.ts, source.tsx</string>
<key>settings</key>
<dict>
<key>shellVariables</key>
<array>
<dict>
<key>name</key>
<string>TM_COMMENT_START</string>
<key>value</key>
<string>// </string>
</dict>
<dict>
<key>name</key>
<string>TM_COMMENT_START_2</string>
<key>value</key>
<string>/*</string>
</dict>
<dict>
<key>name</key>
<string>TM_COMMENT_END_2</string>
<key>value</key>
<string>*/</string>
</dict>
</array>
</dict>
<key>uuid</key>
<string>FF9A09B1-D1C3-4AF0-9A11-2EC300F03184</string>
</dict>
</plist>
================================================
FILE: ErrorList.YAML-tmLanguage
================================================
# [PackageDev] target_format: plist, ext: tmLanguage
---
name: Error List
scopeName: text.error-list
uuid: 52410ea6-4de5-4b0e-9be7-12842e39a3a6
patterns:
- include: '#error-count'
- include: '#filename'
- include: '#message'
repository:
filename:
match: ^([^ ].*:)$
captures:
'1': {name: entity.name.filename.error-list}
error-count:
match: (?<=\[)(\d+\s*errors)(?=\])
captures:
'1': {name: keyword.other.error-list}
message:
begin: \(
end: \n
patterns:
- include: '#location'
location:
match: (?<=\()(\d+),\s*(\d+)(?=\))
captures:
'1': {name: constant.numeric.location.error-list}
'2': {name: constant.numeric.location.error-list}
...
================================================
FILE: FindRefs.YAML-tmLanguage
================================================
# [PackageDev] target_format: plist, ext: hidden-tmLanguage
name: Find Refs
scopeName: text.find-refs
uuid: de594c8b-2688-48c1-bc73-b5c935e408b8
patterns:
- include: '#filename'
- include: '#header'
- include: '#footer'
- include: '#reference'
- include: '#line-with-match'
repository:
filename:
match: ^([^ ].*:)$
captures:
'1': {name: entity.name.filename.find-refs}
footer:
name: text.find-refs
match: '^[0-9]+ matches in [0-9+] files\s*$'
header:
name: text.find-refs
match: ^References to .*$
line-with-match:
begin: '^ +([0-9]+):'
end: $
beginCaptures:
'1': {name: constant.numeric.line-number.match.find-refs }
patterns:
- include: '#single-line-ts'
single-line-ts:
name: meta.ts.find-refs
patterns:
- include: '#expression'
# The remainder of this file is a copy of the TypeScript
# grammar, but with end patterns augmented so that they
# always stay within a single line (since this grammar
# is for single-line referenes into TypeScript files)
var-expr:
name: meta.var.expr.ts
begin: (?<!\()\s*\b(var|let|const(?!\s+enum))\s+([a-zA-Z_$][\w$]*)
beginCaptures:
'1': { name: storage.type.ts }
'2': { name: variable.ts }
end: '$|(?=[;=\}\{])|(?<=\})'
patterns:
- include: '#type-annotation'
control-statement:
name: keyword.control.ts
match: \b(break|catch|continue|declare|do|else|finally|for|if|return|switch|throw|try|while)\b
switch-case:
name: case.expr.ts
begin: '\b(case|default)\b'
beginCaptures:
'1': { name: keyword.control.ts }
end: ':'
patterns:
- include: '#expression'
declaration:
name: meta.declaration.ts
patterns:
- include: '#function-declaration'
- include: '#object-declaration'
- include: '#type-declaration'
- include: '#enum-declaration'
type-declaration:
name: meta.type.declaration.ts
begin: \b(type)\b\s+([a-zA-Z_$][\w$]*)\s*=\s*
beginCaptures:
'1': { name: keyword.other.ts }
'2': { name: storage.type.ts }
end: $|(?=[,);>]|var|type|function|class|interface)
patterns:
- include: '#type'
enum-declaration:
name: meta.enum.declaration.ts
match: (?:\b(const)\s+)?\b(enum)\s+([a-zA-Z_$][\w$]*)
captures:
'1': { name: storage.modifier.ts}
'2': { name: storage.type.ts }
'3': { name: entity.name.class.ts }
object-declaration:
name: meta.declaration.object.ts
begin: '\b(?:(export)\s+)?\b(class|interface)\b(?:\s+([a-zA-Z_$][\w$]*))'
beginCaptures:
'1': { name: storage.modifier.ts }
'2': { name: storage.type.ts }
'3': { name: entity.name.class.ts }
end: $|(?=\})
endCaptures:
'1': { name: brace.curly.ts }
patterns:
- include: '#type-parameters'
- include: '#object-heritage'
- include: '#object-body'
- include: '#comment'
object-heritage:
name: meta.object.heritage.ts
match: (?:\b(extends|implements)\b|,)(?:\s+([a-zA-Z_$][.\w$]*))
captures:
'1': { name: storage.modifier.ts }
'2': { name: storage.type.ts }
object-body:
name: meta.object.body.ts
begin: \{
end: $|(?=\})
patterns:
- include: '#comment'
- include: '#field-declaration'
- include: '#method-declaration'
- include: '#indexer-declaration'
- include: '#type-annotation'
- include: '#variable-initializer'
- include: '#access-modifier'
- include: '#static-modifier'
- include: '#property-accessor'
object-type:
name: meta.object.type.ts
begin: \{
end: $|\}
patterns:
- include: '#comment'
- include: '#field-declaration'
- include: '#method-declaration-no-body'
- include: '#indexer-declaration'
- include: '#type-annotation'
field-declaration:
name: meta.field.declaration.ts
match: '\b([a-zA-Z_$][\w$]*)\s*(\?\s*)?(?=(=|:))'
captures:
'1': { name: variable.ts }
'2': { name: keyword.operator.ts }
method-declaration:
name: meta.method.declaration.ts
begin: '\b(?:(get|set)\s+)?\[?([a-zA-Z_$][\.\w$]*)\s*\]?\s*(\??)\s*(?=\()'
beginCaptures:
'1': { name: storage.type.property.ts }
'2': { name: entity.name.function.ts }
'3': { name: keyword.operator.ts }
end: '$|\}|[;,]'
patterns:
- include: '#comment'
- include: '#function-parameters'
- include: '#type-annotation'
- include: '#decl-block'
method-declaration-no-body:
name: meta.method.declaration.ts
begin: '\b(?:(get|set)\s+)?\[?([a-zA-Z_$][\.\w$]*)\s*\]?\s*(\??)\s*(?=\()'
beginCaptures:
'1': { name: storage.type.property.ts }
'2': { name: entity.name.function.ts }
'3': { name: keyword.operator.ts }
end: '$|(?=\})|[;,]'
patterns:
- include: '#comment'
- include: '#function-parameters'
- include: '#type-annotation'
- include: '#decl-block'
indexer-declaration:
name: meta.indexer.declaration.ts
begin: \[
end: \]\s*(\?\s*)?|$
endCaptures:
'1': { name: keyword.operator.ts }
patterns:
- include: '#type-annotation'
- include: '#indexer-parameter'
- include: '#expression'
indexer-parameter:
name: meta.indexer.parameter.ts
match: ([a-zA-Z_$][\w$]*)(?=\:)
captures:
'1': { name: variable.parameter.ts}
function-declaration:
name: meta.function.ts
begin: \b(function)\b(?:\s+([a-zA-Z_$][\w$]*))?\s*
beginCaptures:
'1': { name: storage.type.function.ts }
'2': { name: entity.name.function.ts }
end: $|(?=\}|;)
patterns:
- include: '#comment'
- include: '#type-parameters'
- include: '#function-parameters'
- include: '#return-type'
- include: '#decl-block'
block:
name: meta.block.ts
begin: \{
end: $|\}
patterns:
- include: '#expression'
- include: '#object-member'
decl-block:
name: meta.decl.block.ts
begin: \{
end: $|(?=\})
patterns:
- include: '#expression'
function-parameters:
name: meta.function-parameters.ts
begin: \(
end: $|\)
patterns:
- include: '#comment'
- include: '#parameter-name'
- include: '#type-annotation'
- include: '#variable-initializer'
function-type-parameters:
name: meta.function.type.ts
begin: \(
end: $|\)
patterns:
- include: '#comment'
- include: '#parameter-name'
- include: '#type-annotation'
- include: '#variable-initializer'
parameter-name:
name: parameter.name.ts
match: '(?:\s*\b(public|private)\b\s+)?(\.\.\.)?\s*([a-zA-Z_$][\w$]*)\s*(\??)'
captures:
'1': { name: storage.modifier.ts }
'2': { name: keyword.operator.ts }
'3': { name: variable.parameter.ts }
'4': { name: keyword.operator.ts }
return-type:
name: meta.return.type.ts
begin: '(?<=\)):'
end: $|(?=\{|;|//)
patterns:
- include: '#type'
type-annotation:
name: meta.type.annotation.ts
begin: ":"
end: (?=[,);}\[\]])|(?==[^>])|(?<=[a-z]|>)\s*(?=\{|$|//)
patterns:
- include: '#type'
- include: '#comment'
type:
name: meta.type.ts
patterns:
- include: '#type-name'
- include: '#type-parameters'
- include: '#type-union'
- include: '#object-type'
- include: '#function-type-parameters'
- include: '#function-type-return-type'
function-type-return-type:
name: meta.function.type.return.ts
begin: '=>'
end: $|(?=[,\){]|//)
patterns:
- include: '#type'
type-union:
name: meta.type.union.ts
begin: '(\|)'
beginCaptures:
'1': { name: keyword.operator.ts }
end: '$|([a-zA-Z_$][.\w$]*)'
endCaptures:
'1': { name: storage.type.ts }
patterns:
- include: '#comment'
type-name:
name: storage.type.ts
match: '[a-zA-Z_$][.\w$]*'
type-parameters:
name: meta.type.parameters.ts
begin: '<'
end: '$|(?=var|type|function|class|interface)|>'
patterns:
- name: keyword.other.ts
match: '\b(extends)\b'
- include: '#comment'
- include: '#type'
variable-initializer:
begin: (=)
beginCaptures:
'1': { name: keyword.operator.ts }
end: $|(?=[,);=])
patterns:
- include: '#expression'
expression:
name: meta.expression.ts
patterns:
- include: '#string'
- include: '#regex'
- include: '#template'
- include: '#comment'
- include: '#literal'
- include: '#paren-expression'
- include: '#var-expr'
- include: '#declaration'
- include: '#cast'
- include: '#new-expr'
- include: '#block'
- include: '#expression-operator'
- include: '#relational-operator'
- include: '#arithmetic-operator'
- include: '#logic-operator'
- include: '#assignment-operator'
- include: '#storage-keyword'
- include: '#control-statement'
- include: '#switch-case'
- include: '#for-in-simple'
for-in-simple:
name: forin.expr.ts
match: (?<=\()\s*\b(var|let)\s+([a-zA-Z_$][\w$]*)\s+(in)\b
captures:
'1': { name: storage.type.ts }
'3': { name: keyword.operator.ts }
cast:
name: cast.expr.ts
match: '<\s*([a-zA-Z_$][.\w$]*)\s*(?:<([a-zA-Z_$][.\w$]*)>)?\s*(\[\])*\s*>'
captures:
'1': { name: storage.type.ts }
'2': { name: storage.type.ts }
new-expr:
name: new.expr.ts
match: '\b(new)\b\s*([a-zA-Z_$][.\w$]*)'
captures:
'1': { name: keyword.operator.ts }
'2': { name: storage.type.ts }
# TODO: object members with quoted or numric lhs
object-member:
name: meta.object.member.ts
begin: '[a-zA-Z_$][\w$]*\s*:'
end: $|(?=,|\})
patterns:
- include: '#expression'
expression-operator:
name: keyword.operator.ts
match: =>|\b(delete|export|import|in|instanceof|module|new|typeof|void)\b
arithmetic-operator:
name: keyword.operator.ts
match: \*|/|\-\-|\-|\+\+|\+|%
relational-operator:
name: keyword.operator.ts
match: ===|!==|==|!=|<=|>=|<>|=|<|>
assignment-operator:
name: keyword.operator.ts
match: <<=|>>>=|>>=|\*=|(?<!\()/=|%=|\+=|\-=|&=|\^=
logic-operator:
name: keyword.operator.ts
match: \!|&&|&|~|\|\||\|
storage-keyword:
name: storage.type.ts
match: \b(number|boolean|string)\b
paren-expression:
begin: \(
beginCaptures:
'0': {name: brace.paren.ts }
end: $|\)
endCaptures:
'0': {name: brace.paren.ts }
patterns:
- include: '#expression'
qstring-double:
name: string.double.ts
begin: '"'
end: '"|(?=$)'
patterns:
- include: '#string-character-escape'
qstring-single:
name: string.single.ts
begin: "'"
end: "'|(?=$)"
patterns:
- include: '#string-character-escape'
regex:
name: string.regex.ts
begin: (?<=[=(:,\[]|^|return|&&|\|\||!)\s*(/)(?![/*+{}?])
end: $|(/)[igm]*
patterns:
- name: constant.character.escape.ts
match: \\.
- name: constant.character.class.ts
match: \[(\\\]|[^\]])*\]
string:
name: string.ts
patterns:
- include: '#qstring-single'
- include: '#qstring-double'
template:
name: meta.template.ts
begin: '`'
beginCaptures:
'0': { name: string.template.ts}
end: '$|`'
endCaptures:
'0': { name: string.template.ts}
patterns:
- include: '#template-substitution-element'
- include: '#template-string-contents'
template-string-contents:
name: string.template.ts
begin: '.*?'
end: $|(?=(\$\{|`))
patterns:
- include: '#string-character-escape'
string-character-escape:
name: constant.character.escape
match: \\(x\h{2}|[0-2][0-7]{,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)
template-substitution-element:
name: template.element.ts
begin: \$\{
beginCaptures:
'0': {name: keyword.operator.ts}
end: $|\}
endCaptures:
'0': {name: keyword.operator.ts}
patterns:
- include: '#expression'
comment:
name: comment.ts
patterns:
- include: '#comment-block-doc'
- include: '#comment-block'
- include: '#comment-line'
comment-block-doc:
name: comment.block.documentation.ts
begin: /\*\*(?!/)
end: $|\*/
comment-block:
name: comment.block.ts
begin: /\*
end: $|\*/
comment-line:
name: comment.line.ts
match: (//).*$\n?
literal:
name: literal.ts
patterns:
- include: '#numeric-literal'
- include: '#boolean-literal'
- include: '#null-literal'
- include: '#undefined-literal'
- include: '#array-literal'
array-literal:
name: meta.array.literal.ts
begin: \[
beginCaptures:
'0': { name: brace.square.ts }
end: $|\]
endCaptures:
'0': { name: brace.square.ts }
patterns:
- include: '#expression'
numeric-literal:
name: constant.numeric.ts
match: \b((0(x|X)[0-9a-fA-F]+)|([0-9]+(\.[0-9]+)?))\b
boolean-literal:
name: constant.language.boolean.ts
match: \b(false|true)\b
null-literal:
name: constant.language.null.ts
match: \b(null)\b
undefined-literal:
name: constant.language.ts
match: \b(undefined)\b
access-modifier:
name: storage.modifier.ts
match: \b(public|protected|private)\b
static-modifier:
name: keyword.other.ts
match: \b(static)\b
property-accessor:
name: storage.type.property.ts
match: \b(get|set)\b
================================================
FILE: LICENSE.txt
================================================
Copyright (c) Microsoft Corporation
All rights reserved.
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
================================================
FILE: README.md
================================================
# TypeScript-TmLanguage
[](https://github.com/microsoft/TypeScript-TmLanguage/actions?query=workflow%3ACI)
This repository contains TmLanguage files that are consumed by TypeScript editors and plugins such as [Visual Studio Code](https://github.com/Microsoft/vscode), [The TypeScript Sublime Plugin](https://github.com/Microsoft/TypeScript-Sublime-Plugin), [Atom TypeScript](https://github.com/TypeStrong/atom-typescript), and possibly others.
Latest version of the grammar can be also found as a [VSCode extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-typescript-next).
# Contributing
The XML files are generated from the YAML files, so contributors should hand-modify the YAML files, and XML files should only be generated by running build script.
## Install dependencies
``` sh
npm install
```
## Build
Compile the yaml file into the tmLanguage and tmTheme files
``` sh
npm run build:grammar
```
## Tests
``` sh
npm test # Compiles & runs tests
npm run diff # Diffs the test baselines with generated one using tool set in environment variable DIFF
npm run accept # Accepts the test baselines
```
================================================
FILE: SECURITY.md
================================================
<!-- BEGIN MICROSOFT SECURITY.MD V0.0.7 BLOCK -->
## Security
Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below.
## Reporting Security Issues
**Please do not report security vulnerabilities through public GitHub issues.**
Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report).
If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey).
You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc).
Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
* Full paths of source file(s) related to the manifestation of the issue
* The location of the affected source code (tag/branch/commit or direct URL)
* Any special configuration required to reproduce the issue
* Step-by-step instructions to reproduce the issue
* Proof-of-concept or exploit code (if possible)
* Impact of the issue, including how an attacker might exploit the issue
This information will help us triage your report more quickly.
If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs.
## Preferred Languages
We prefer all communications to be in English.
## Policy
Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd).
<!-- END MICROSOFT SECURITY.MD BLOCK -->
================================================
FILE: ThirdPartyNotices.txt
================================================
THIRD-PARTY SOFTWARE NOTICES AND INFORMATION
Do Not Translate or Localize
Latest TypeScript and Javascript Grammar incorporates third party material from the projects listed below. The original copyright notice and the license under which Microsoft received such third party material are set forth below. Microsoft reserves all other rights not expressly granted, whether by implication, estoppel or otherwise.
1. babel-sublime (https://github.com/babel/babel-sublime)
2. language-javascript (https://github.com/atom/language-javascript)
%% babel-sublime NOTICES, INFORMATION, AND LICENSE BEGIN HERE
=========================================
Copyright (c) 2015 Andres Suarez
MIT License
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
=========================================
END OF babel-sublime NOTICES, INFORMATION, AND LICENSE
%% language-javascript NOTICES, INFORMATION, AND LICENSE BEGIN HERE
=========================================
Copyright (c) 2015 GitHub Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
This package was derived from a TextMate bundle located at https://github.com/textmate/javascript.tmbundle and distributed under the following license, located in README.mdown:
Permission to copy, use, modify, sell and distribute this software is granted. This software is provided "as is" without express or implied warranty, and with no claim as to its suitability for any purpose.
=========================================
END OF language-javascript NOTICES, INFORMATION, AND LICENSE
================================================
FILE: TypeScript Indent.YAML-tmPreferences
================================================
# [PackageDev] target_format: plist, ext: tmPreferences
---
name: TypeScript Indent
uuid: 77966fa8-af34-4f1e-8535-e556d5063853
scope: source.ts, source.tsx
settings:
bracketIndentNextLinePattern:
>
(?x)
^ \s* \b(if|while|else)\b [^;]* $
| ^ \s* \b(for)\b .* $
decreaseIndentPattern: ^(.*\*/)?\s*\}.*$
increaseIndentPattern: ^.*\{[^}"']*$
================================================
FILE: TypeScript Indent.tmPreferences
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>TypeScript Indent</string>
<key>scope</key>
<string>source.ts, source.tsx</string>
<key>settings</key>
<dict>
<key>bracketIndentNextLinePattern</key>
<string>(?x)
^ \s* \b(if|while|else)\b [^;]* $
| ^ \s* \b(for)\b .* $
</string>
<key>decreaseIndentPattern</key>
<string>^(.*\*/)?\s*\}.*$</string>
<key>increaseIndentPattern</key>
<string>^.*\{[^}"']*$</string>
</dict>
<key>uuid</key>
<string>77966fa8-af34-4f1e-8535-e556d5063853</string>
</dict>
</plist>
================================================
FILE: TypeScript.YAML-tmLanguage
================================================
# [PackageDev] target_format: plist, ext: tmLanguage
---
name: TypeScript
scopeName: source.ts
fileTypes: [ts]
uuid: ef98eb90-bf9b-11e4-bb52-0800200c9a66
variables:
startOfIdentifier: (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))
endOfIdentifier: (?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))
propertyAccess: (?:(\.)|(\?\.(?!\s*[[:digit:]])))
propertyAccessPreIdentifier: \??\.\s*
identifier: '[_$[:alpha:]][_$[:alnum:]]*'
constantIdentifier: '[[:upper:]][_$[:digit:][:upper:]]*'
propertyIdentifier: '\#?{{identifier}}'
constantPropertyIdentifier: '\#?{{constantIdentifier}}'
quotedStrings: (\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)
nonIdentifierPropertyName: '{{quotedStrings}}|(\[([^\[\]]|\[[^\[\]]*\])+\])'
label: ({{identifier}})\s*(:)
hexNumber: \b(?<!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$)
binaryNumber: \b(?<!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$)
octalNumber: \b(?<!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$)
decimalNumber: |-
(?<!\$)(?:
(?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
(?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
(?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
(?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3
(?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
(?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
(?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
(?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
)(?!\$)
anyNumber: ({{hexNumber}})|({{binaryNumber}})|({{octalNumber}})|({{decimalNumber}})
# any use of property name needs to ignore line breaks in regular expression because of decimal number regex (maintained for readability)
propertyName: ({{anyNumber}}|({{identifier}})|{{nonIdentifierPropertyName}})
propertyNameWithPrivate: ({{anyNumber}}|({{propertyIdentifier}})|{{nonIdentifierPropertyName}})
constantVar: ({{constantIdentifier}})(?![_$[:alnum:]])
usingKeyword: '(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)'
awaitUsingKeyword: '(?:\bawait\s+{{usingKeyword}}\b)'
constructsAndModifiers: '(?:abstract|async|{{awaitUsingKeyword}}|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|{{usingKeyword}}|var|while)\b'
endOfStatement: ';|^\s*$|(?:^\s*{{constructsAndModifiers}})'
varExprStart: '{{startOfDeclaration}}\b(var|let){{endOfIdentifier}}'
constExprStart: '{{startOfDeclaration}}\b(const(?!\s+enum\b)){{endOfIdentifier}}'
usingExprStart: '{{startOfDeclaration}}\b({{usingKeyword}}|{{awaitUsingKeyword}}){{endOfIdentifier}}'
nonPropertyLookBehind: '[^\._$[:alnum:]]'
lookBehindReturn: '^return|{{nonPropertyLookBehind}}return'
lookBehindThrow: '^throw|{{nonPropertyLookBehind}}throw'
lookBehindYield: '^yield|{{nonPropertyLookBehind}}yield'
lookBehindAwait: '^await|{{nonPropertyLookBehind}}await'
lookBehindDefault: '^default|{{nonPropertyLookBehind}}default'
lookBehindConst: '^const|{{nonPropertyLookBehind}}const'
lookBehindLet: '^let|{{nonPropertyLookBehind}}let'
lookBehindUsing: '^using|{{nonPropertyLookBehind}}using'
lookBehindAwaitUsing: '^await\s+using|{{nonPropertyLookBehind}}await\s+using'
lookBehindVar: '^var|{{nonPropertyLookBehind}}var'
lookBehindIn: '^in|{{nonPropertyLookBehind}}in'
lookBehindOf: '^of|{{nonPropertyLookBehind}}of'
lookBehindTypeof: '^typeof|{{nonPropertyLookBehind}}typeof'
lookBehindCase: '^case|{{nonPropertyLookBehind}}case'
lookBehindImport: '^import|{{nonPropertyLookBehind}}import'
lookAheadEndOfType: '[;),}\]:?\-\+\>]|\|\||\&\&|\!\=\=|$'
matchingParenthesis: (\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))
matchingBraces: (\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})
matchingBrackets: (\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])
inlineComment: \/\*([^\*]|(\*[^\/]))*\*\/
startOfDeclaration: '{{startOfIdentifier}}(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?'
lookBehindOfPossiblyMultilineArrowWithDestructuring: (?<=[(=,])
lookBehindOfPossiblyMultilineArrow: (?<=[(=,]|=>|{{lookBehindReturn}})
lookBehindOfObjectMemberPossiblyMultilineArrow: (?<=:)
# Identifier start | matching braces | matching parenthesis | matching square brackets
typeParamersStart: (((const\s+)?[_$[:alpha:]])|{{matchingBraces}}|{{matchingParenthesis}}|{{matchingBrackets}})
typeParameters: (<\s*{{typeParamersStart}}([^=<>]|=[^<]|\<\s*{{typeParamersStart}}([^=<>]|=[^<]|\<\s*{{typeParamersStart}}([^=<>]|=[^<])*\>)*\>)*>\s*)
# Identifier start | matching braces | matching parenthesis | matching square brackets | matching strings
typeArgumentsStart: (((keyof|infer|typeof|readonly)\s+)|(({{identifier}}|{{matchingBraces}}|{{matchingParenthesis}}|{{matchingBrackets}}|{{quotedStrings}})(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))
typeArgumentsInnerExpressionPart: '[^<>\(]|{{matchingParenthesis}}|(?<==)\>'
typeArguments: '<\s*{{typeArgumentsStart}}({{typeArgumentsInnerExpressionPart}}|\<\s*{{typeArgumentsStart}}(({{typeArgumentsInnerExpressionPart}}|\<\s*{{typeArgumentsStart}}({{typeArgumentsInnerExpressionPart}})*(?<!=)\>))*(?<!=)\>)*(?<!=)>'
possiblyMultilineTypeArgument: (<\s*[\{\[\(]\s*$)
functionCallLookup: \s*(?:(\?\.\s*)|(\!))?(({{typeArguments}}\s*)?\()
functionCallNamedTarget: (({{identifier}})(\s*{{propertyAccessPreIdentifier}}({{propertyIdentifier}}))*)|({{propertyAccessPreIdentifier}}{{propertyIdentifier}})
functionCallTarget: (({{functionCallNamedTarget}})|(?<=[\)]))
possiblyMultilineCallWithTypeArguments: \s*(?:(\?\.\s*)|(\!))?{{possiblyMultilineTypeArgument}}
possiblyType: \s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+
typeparamertStartOfArrow: ''
arrowLookup: |-
# sure shot arrow functions even if => is on new line
(
{{typeParameters}}?
[(]\s*({{inlineComment}}\s*)*
(
([)]\s*:) | # ():
((\.\.\.\s*)?{{identifier}}\s*:) # [(]param: | [(]...param:
)
) |
{{typeparamertStartOfArrow}}
# arrow function possible to detect only with => on same line
(
{{typeParameters}}? # typeparameters
\(\s*({{inlineComment}}\s*)*(([_$[:alpha:]]|{{matchingBraces}}|{{matchingBrackets}}|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|{{matchingParenthesis}}|{{quotedStrings}})*)?\) # parameters
(\s*:{{possiblyType}})? # return type
\s*=> # arrow operator
)
possiblyMultilineArrowExpressionBeforeEndOfLine: ((({{typeParameters}})?\()|(<)|({{typeParameters}}))
possiblyMultilineObjectBindingPattern: '{{matchingBraces}}\s*((:\s*\{?$)|(({{possiblyType}}\s*)?=\s*))'
possiblyMultilineArrayBindingPattern: '{{matchingBrackets}}\s*((:\s*\[?$)|(({{possiblyType}}\s*)?=\s*))'
possiblyMultilineArrowWParamters: '((([\{\[]\s*)?$)|({{possiblyMultilineObjectBindingPattern}})|({{possiblyMultilineArrayBindingPattern}}))'
possiblyMultilineArrowWithoutTypeParameters: '[\(]\s*{{possiblyMultilineArrowWParamters}}'
possiblyMultilineArrow: ((<\s*$)|({{typeParameters}}?{{possiblyMultilineArrowWithoutTypeParameters}})) # during lookup treat <typeparameters>?( followed by line end as arrow or < followed by new line
functionOrArrowLookup: |-
\s*(
((async\s+)?(
(function\s*[(<*]) |
(function\s+) |
({{identifier}}\s*=>)
)) |
((async\s*)?(
{{possiblyMultilineArrow}} |
{{arrowLookup}}
))
)
functionLikeType: |-
(:\s*(
(<) |
([(]\s*(
([)]) |
(\.\.\.) |
([_$[:alnum:]]+\s*(
([:,?=])|
([)]\s*=>)
))
))
)) |
(:\s*{{startOfIdentifier}}Function{{endOfIdentifier}}) |
(:\s*{{possiblyMultilineArrow}})
functionLikeAssignmentOrType: |-
\s*
# function assignment |
(={{functionOrArrowLookup}}) |
# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>
{{functionLikeType}} |
(:\s*(=>|{{matchingParenthesis}}|(<[^<>]*>)|[^<>(),=])+={{functionOrArrowLookup}})
arrowFunctionEnd: (?==>|\{|(^\s*(export|function|class|interface|let|var|{{usingKeyword}}|{{awaitUsingKeyword}}|const|import|enum|namespace|module|type|abstract|declare)\s+))
regexpTail: ([dgimsuvy]+|(?![\/\*])|(?=\/\*))(?!\s*[a-zA-Z0-9_$])
completeRegexp: \/(?![\/*])(?=(?:[^\/\\\[]|\\.|\[([^\]\\]|\\.)*\])+\/{{regexpTail}})
patterns:
- include: '#directives'
- include: '#statements'
- include: '#shebang'
repository:
shebang:
name: comment.line.shebang.ts
match: \A(#!).*(?=$)
captures:
'1': { name: punctuation.definition.comment.ts }
statements:
patterns:
- include: '#declaration'
- include: '#control-statement'
- include: '#after-operator-block-as-object-literal'
- include: '#decl-block'
- include: '#label'
- include: '#expression'
- include: '#punctuation-semicolon'
- include: '#string'
- include: '#comment'
declaration:
patterns:
- include: '#decorator'
- include: '#var-expr'
- include: '#function-declaration'
- include: '#class-declaration'
- include: '#interface-declaration'
- include: '#enum-declaration'
- include: '#namespace-declaration'
- include: '#type-alias-declaration'
- include: '#import-equals-declaration'
- include: '#import-declaration'
- include: '#export-declaration'
- name: storage.modifier.ts
match: '{{startOfIdentifier}}(declare|export){{endOfIdentifier}}'
control-statement:
patterns:
- include: '#switch-statement'
- include: '#for-loop'
- name: keyword.control.trycatch.ts
match: '{{startOfIdentifier}}(catch|finally|throw|try){{endOfIdentifier}}'
- match: '{{startOfIdentifier}}(break|continue|goto)\s+({{identifier}}){{endOfIdentifier}}'
captures:
'1': { name: keyword.control.loop.ts }
'2': { name: entity.name.label.ts }
- name: keyword.control.loop.ts
match: '{{startOfIdentifier}}(break|continue|do|goto|while){{endOfIdentifier}}'
- begin: '{{startOfIdentifier}}(return){{endOfIdentifier}}'
beginCaptures:
'0': { name: keyword.control.flow.ts }
end: (?=[;}]|$|{{endOfStatement}})
patterns:
- include: '#expression'
- name: keyword.control.switch.ts
match: '{{startOfIdentifier}}(case|default|switch){{endOfIdentifier}}'
- include: '#if-statement'
- name: keyword.control.conditional.ts
match: '{{startOfIdentifier}}(else|if){{endOfIdentifier}}'
- name: keyword.control.with.ts
match: '{{startOfIdentifier}}(with){{endOfIdentifier}}'
- name: keyword.control.ts
match: '{{startOfIdentifier}}(package){{endOfIdentifier}}'
- name: keyword.other.debugger.ts
match: '{{startOfIdentifier}}(debugger){{endOfIdentifier}}'
label:
patterns:
# handle declaration block followed by label so as to not confuse it with { followed by ternary operator which would be object literal
- begin: '{{label}}(?=\s*\{)'
beginCaptures:
'1': { name: entity.name.label.ts }
'2': { name: punctuation.separator.label.ts }
end: (?<=\})
patterns:
- include: '#decl-block'
- match: '{{label}}'
captures:
'1': { name: entity.name.label.ts }
'2': { name: punctuation.separator.label.ts }
expression:
patterns:
- include: '#expressionWithoutIdentifiers'
- include: '#identifiers'
- include: '#expressionPunctuations'
expressionWithoutIdentifiers:
patterns:
- include: '#string'
- include: '#regex'
- include: '#comment'
- include: '#function-expression'
- include: '#class-expression'
- include: '#arrow-function'
- include: '#paren-expression-possibly-arrow'
- include: '#cast'
- include: '#ternary-expression'
- include: '#new-expr'
- include: '#instanceof-expr'
- include: '#object-literal'
- include: '#expression-operators'
- include: '#function-call'
- include: '#literal'
- include: '#support-objects'
- include: '#paren-expression'
expressionPunctuations:
patterns:
- include: '#punctuation-comma'
- include: '#punctuation-accessor'
decorator:
name: meta.decorator.ts
begin: '{{startOfIdentifier}}\@'
beginCaptures:
'0': { name: punctuation.decorator.ts }
end: (?=\s)
patterns:
- include: '#expression'
#variable, parameters, fields
var-expr:
patterns:
# let/var
- name: meta.var.expr.ts
begin: (?={{varExprStart}})
end: (?!{{varExprStart}})((?=^|;|}|({{startOfIdentifier}}(of|in)\s+)|{{endOfStatement}})|((?<!{{lookBehindLet}}|{{lookBehindVar}})(?=\s*$)))
patterns:
- begin: '{{varExprStart}}\s*'
beginCaptures:
'1': { name: keyword.control.export.ts }
'2': { name: storage.modifier.ts }
'3': { name: storage.type.ts }
end: (?=\S)
- include: '#destructuring-variable'
- include: '#var-single-variable'
- include: '#variable-initializer'
- include: '#comment'
- begin: (,)\s*(?=$|\/\/)
beginCaptures:
'1': { name: punctuation.separator.comma.ts }
end: (?<!,)(((?==|;|}|({{startOfIdentifier}}(of|in)\s+)|^\s*$))|((?<=\S)(?=\s*$)))
patterns:
- include: '#single-line-comment-consuming-line-ending'
- include: '#comment'
- include: '#destructuring-variable'
- include: '#var-single-variable'
- include: '#punctuation-comma'
- include: '#punctuation-comma'
# const
- name: meta.var.expr.ts
begin: (?={{constExprStart}})
beginCaptures:
'1': { name: keyword.control.export.ts }
'2': { name: storage.modifier.ts }
'3': { name: storage.type.ts }
end: (?!{{constExprStart}})((?=^|;|}|({{startOfIdentifier}}(of|in)\s+)|{{endOfStatement}})|((?<!{{lookBehindConst}})(?=\s*$)))
patterns:
- begin: '{{constExprStart}}\s*'
beginCaptures:
'1': { name: keyword.control.export.ts }
'2': { name: storage.modifier.ts }
'3': { name: storage.type.ts }
end: (?=\S)
- include: '#destructuring-const'
- include: '#var-single-const'
- include: '#variable-initializer'
- include: '#comment'
- begin: (,)\s*(?=$|\/\/)
beginCaptures:
'1': { name: punctuation.separator.comma.ts }
end: (?<!,)(((?==|;|}|({{startOfIdentifier}}(of|in)\s+)|^\s*$))|((?<=\S)(?=\s*$)))
patterns:
- include: '#single-line-comment-consuming-line-ending'
- include: '#comment'
- include: '#destructuring-const'
- include: '#var-single-const'
- include: '#punctuation-comma'
- include: '#punctuation-comma'
# using/await using
- name: meta.var.expr.ts
begin: (?={{usingExprStart}})
beginCaptures:
'1': { name: keyword.control.export.ts }
'2': { name: storage.modifier.ts }
'3': { name: storage.type.ts }
end: (?!{{usingExprStart}})((?=;|}|({{startOfIdentifier}}(of|in)\s+)|{{endOfStatement}})|((?<!{{lookBehindUsing}}|{{lookBehindAwaitUsing}})(?=\s*$)))
patterns:
- begin: '{{usingExprStart}}\s*'
beginCaptures:
'1': { name: keyword.control.export.ts }
'2': { name: storage.modifier.ts }
'3': { name: storage.type.ts }
end: (?=\S)
- include: '#var-single-const'
- include: '#variable-initializer'
- include: '#comment'
- begin: (,)\s*((?!\S)|(?=\/\/))
beginCaptures:
'1': { name: punctuation.separator.comma.ts }
end: (?<!,)(((?==|;|}|({{startOfIdentifier}}(of|in)\s+)|^\s*$))|((?<=\S)(?=\s*$)))
patterns:
- include: '#single-line-comment-consuming-line-ending'
- include: '#comment'
- include: '#var-single-const'
- include: '#punctuation-comma'
- include: '#punctuation-comma'
var-single-variable:
patterns:
- name: meta.var-single-variable.expr.ts
begin: |-
(?x)({{identifier}})(\!)?(?={{functionLikeAssignmentOrType}})
beginCaptures:
'1': { name: meta.definition.variable.ts entity.name.function.ts }
'2': { name: keyword.operator.definiteassignment.ts }
end: (?=$|^|[;,=}]|({{startOfIdentifier}}(of|in)\s+)|({{endOfStatement}}))
patterns:
- include: '#var-single-variable-type-annotation'
- name: meta.var-single-variable.expr.ts
begin: '{{constantVar}}(\!)?'
beginCaptures:
'1': { name: meta.definition.variable.ts variable.other.constant.ts }
'2': { name: keyword.operator.definiteassignment.ts }
end: (?=$|^|[;,=}]|({{startOfIdentifier}}(of|in)\s+)|({{endOfStatement}}))
patterns:
- include: '#var-single-variable-type-annotation'
- name: meta.var-single-variable.expr.ts
begin: ({{identifier}})(\!)?
beginCaptures:
'1': { name: meta.definition.variable.ts variable.other.readwrite.ts }
'2': { name: keyword.operator.definiteassignment.ts }
end: (?=$|^|[;,=}]|({{startOfIdentifier}}(of|in)\s+)|({{endOfStatement}}))
patterns:
- include: '#var-single-variable-type-annotation'
var-single-const:
patterns:
- name: meta.var-single-variable.expr.ts
begin: |-
(?x)({{identifier}})(?={{functionLikeAssignmentOrType}})
beginCaptures:
'1': { name: meta.definition.variable.ts variable.other.constant.ts entity.name.function.ts }
end: (?=$|^|[;,=}]|({{startOfIdentifier}}(of|in)\s+)|({{endOfStatement}}))
patterns:
- include: '#var-single-variable-type-annotation'
- name: meta.var-single-variable.expr.ts
begin: ({{identifier}})
beginCaptures:
'1': { name: meta.definition.variable.ts variable.other.constant.ts }
end: (?=$|^|[;,=}]|({{startOfIdentifier}}(of|in)\s+)|({{endOfStatement}}))
patterns:
- include: '#var-single-variable-type-annotation'
var-single-variable-type-annotation:
patterns:
- include: '#type-annotation'
- include: '#string'
- include: '#comment'
destructuring-variable:
patterns:
- name: meta.object-binding-pattern-variable.ts
begin: (?<!=|:|{{lookBehindOf}}|{{lookBehindIn}})\s*(?=\{)
end: (?=$|^|[;,=}]|({{startOfIdentifier}}(of|in)\s+))
patterns:
- include: '#object-binding-pattern'
- include: '#type-annotation'
- include: '#comment'
- name: meta.array-binding-pattern-variable.ts
begin: (?<!=|:|{{lookBehindOf}}|{{lookBehindIn}})\s*(?=\[)
end: (?=$|^|[;,=}]|({{startOfIdentifier}}(of|in)\s+))
patterns:
- include: '#array-binding-pattern'
- include: '#type-annotation'
- include: '#comment'
destructuring-const:
patterns:
- name: meta.object-binding-pattern-variable.ts
begin: (?<!=|:|{{lookBehindOf}}|{{lookBehindIn}})\s*(?=\{)
end: (?=$|^|[;,=}]|({{startOfIdentifier}}(of|in)\s+))
patterns:
- include: '#object-binding-pattern-const'
- include: '#type-annotation'
- include: '#comment'
- name: meta.array-binding-pattern-variable.ts
begin: (?<!=|:|{{lookBehindOf}}|{{lookBehindIn}})\s*(?=\[)
end: (?=$|^|[;,=}]|({{startOfIdentifier}}(of|in)\s+))
patterns:
- include: '#array-binding-pattern-const'
- include: '#type-annotation'
- include: '#comment'
object-binding-element:
patterns:
- include: '#comment'
- begin: (?x)(?={{propertyName}}\s*(:))
end: (?=,|\})
patterns:
- include: '#object-binding-element-propertyName'
- include: '#binding-element'
- include: '#object-binding-pattern'
- include: '#destructuring-variable-rest'
- include: '#variable-initializer'
- include: '#punctuation-comma'
object-binding-element-const:
patterns:
- include: '#comment'
- begin: (?x)(?={{propertyName}}\s*(:))
end: (?=,|\})
patterns:
- include: '#object-binding-element-propertyName'
- include: '#binding-element-const'
- include: '#object-binding-pattern-const'
- include: '#destructuring-variable-rest-const'
- include: '#variable-initializer'
- include: '#punctuation-comma'
object-binding-element-propertyName:
begin: (?x)(?={{propertyName}}\s*(:))
end: (:)
endCaptures:
'0': { name: punctuation.destructuring.ts }
patterns:
- include: '#string'
- include: '#array-literal'
- include: '#numeric-literal'
- name: variable.object.property.ts
match: ({{identifier}})
binding-element:
patterns:
- include: '#comment'
- include: '#string'
- include: '#numeric-literal'
- include: '#regex'
- include: '#object-binding-pattern'
- include: '#array-binding-pattern'
- include: '#destructuring-variable-rest'
- include: '#variable-initializer'
binding-element-const:
patterns:
- include: '#comment'
- include: '#string'
- include: '#numeric-literal'
- include: '#regex'
- include: '#object-binding-pattern-const'
- include: '#array-binding-pattern-const'
- include: '#destructuring-variable-rest-const'
- include: '#variable-initializer'
destructuring-variable-rest:
match: (?:(\.\.\.)\s*)?({{identifier}})
captures:
'1': { name: keyword.operator.rest.ts }
'2': { name: meta.definition.variable.ts variable.other.readwrite.ts }
destructuring-variable-rest-const:
match: (?:(\.\.\.)\s*)?({{identifier}})
captures:
'1': { name: keyword.operator.rest.ts }
'2': { name: meta.definition.variable.ts variable.other.constant.ts }
object-binding-pattern:
begin: (?:(\.\.\.)\s*)?(\{)
beginCaptures:
'1': { name: keyword.operator.rest.ts }
'2': { name: punctuation.definition.binding-pattern.object.ts }
end: \}
endCaptures:
'0': { name: punctuation.definition.binding-pattern.object.ts }
patterns:
- include: '#object-binding-element'
object-binding-pattern-const:
begin: (?:(\.\.\.)\s*)?(\{)
beginCaptures:
'1': { name: keyword.operator.rest.ts }
'2': { name: punctuation.definition.binding-pattern.object.ts }
end: \}
endCaptures:
'0': { name: punctuation.definition.binding-pattern.object.ts }
patterns:
- include: '#object-binding-element-const'
array-binding-pattern:
begin: (?:(\.\.\.)\s*)?(\[)
beginCaptures:
'1': { name: keyword.operator.rest.ts }
'2': { name: punctuation.definition.binding-pattern.array.ts }
end: \]
endCaptures:
'0': { name: punctuation.definition.binding-pattern.array.ts }
patterns:
- include: '#binding-element'
- include: '#punctuation-comma'
array-binding-pattern-const:
begin: (?:(\.\.\.)\s*)?(\[)
beginCaptures:
'1': { name: keyword.operator.rest.ts }
'2': { name: punctuation.definition.binding-pattern.array.ts }
end: \]
endCaptures:
'0': { name: punctuation.definition.binding-pattern.array.ts }
patterns:
- include: '#binding-element-const'
- include: '#punctuation-comma'
# When doing modication to parameter name, also modify expression-inside-possibly-arrow-parens where this is inlined so as to make
# as optional operator only if it is not followed by assignment or type annotation
parameter-name:
patterns:
- match: '{{startOfIdentifier}}(override|public|protected|private|readonly)\s+(?=(override|public|protected|private|readonly)\s+)'
captures:
'1': { name: storage.modifier.ts }
- match: |-
(?x)(?:{{startOfIdentifier}}(override|public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:){{startOfIdentifier}}(?:(this)|({{identifier}})){{endOfIdentifier}}\s*(\??)(?={{functionLikeAssignmentOrType}})
captures:
'1': { name: storage.modifier.ts }
'2': { name: keyword.operator.rest.ts }
'3': { name: entity.name.function.ts variable.language.this.ts }
'4': { name: entity.name.function.ts }
'5': { name: keyword.operator.optional.ts }
- match: |-
(?x)(?:{{startOfIdentifier}}(override|public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:){{startOfIdentifier}}(?:(this)|({{identifier}})){{endOfIdentifier}}\s*(\??)
captures:
'1': { name: storage.modifier.ts }
'2': { name: keyword.operator.rest.ts }
'3': { name: variable.parameter.ts variable.language.this.ts }
'4': { name: variable.parameter.ts }
'5': { name: keyword.operator.optional.ts }
destructuring-parameter:
patterns:
- name: meta.parameter.object-binding-pattern.ts
begin: (?<!=|:)\s*(?:(\.\.\.)\s*)?(\{)
beginCaptures:
'1': { name: keyword.operator.rest.ts }
'2': { name: punctuation.definition.binding-pattern.object.ts }
end: \}
endCaptures:
'0': { name: punctuation.definition.binding-pattern.object.ts }
patterns:
- include: '#parameter-object-binding-element'
- name: meta.paramter.array-binding-pattern.ts
begin: (?<!=|:)\s*(?:(\.\.\.)\s*)?(\[)
beginCaptures:
'1': { name: keyword.operator.rest.ts }
'2': { name: punctuation.definition.binding-pattern.array.ts }
end: \]
endCaptures:
'0': { name: punctuation.definition.binding-pattern.array.ts }
patterns:
- include: '#parameter-binding-element'
- include: '#punctuation-comma'
parameter-object-binding-element:
patterns:
- include: '#comment'
- begin: (?x)(?={{propertyName}}\s*(:))
end: (?=,|\})
patterns:
- include: '#object-binding-element-propertyName'
- include: '#parameter-binding-element'
- include: '#paren-expression' # as fallback when coming through possibly arrow or expression scenario
- include: '#parameter-object-binding-pattern'
- include: '#destructuring-parameter-rest'
- include: '#variable-initializer'
- include: '#punctuation-comma'
parameter-binding-element:
patterns:
- include: '#comment'
- include: '#string'
- include: '#numeric-literal'
- include: '#regex'
- include: '#parameter-object-binding-pattern'
- include: '#parameter-array-binding-pattern'
- include: '#destructuring-parameter-rest'
- include: '#variable-initializer'
destructuring-parameter-rest:
match: (?:(\.\.\.)\s*)?({{identifier}})
captures:
'1': { name: keyword.operator.rest.ts }
'2': { name: variable.parameter.ts }
parameter-object-binding-pattern:
begin: (?:(\.\.\.)\s*)?(\{)
beginCaptures:
'1': { name: keyword.operator.rest.ts }
'2': { name: punctuation.definition.binding-pattern.object.ts }
end: \}
endCaptures:
'0': { name: punctuation.definition.binding-pattern.object.ts }
patterns:
- include: '#parameter-object-binding-element'
parameter-array-binding-pattern:
begin: (?:(\.\.\.)\s*)?(\[)
beginCaptures:
'1': { name: keyword.operator.rest.ts }
'2': { name: punctuation.definition.binding-pattern.array.ts }
end: \]
endCaptures:
'0': { name: punctuation.definition.binding-pattern.array.ts }
patterns:
- include: '#parameter-binding-element'
- include: '#punctuation-comma'
field-declaration:
name: meta.field.declaration.ts
begin: (?x)(?<!\()(?:{{startOfIdentifier}}(readonly)\s+)?(?=\s*{{propertyNameWithPrivate}}\s*(?:(?:(\?)|(\!))\s*)?(=|:|;|,|\}|$))
beginCaptures:
'1': { name: storage.modifier.ts }
end: (?x)(?=\}|;|,|$|(^(?!\s*{{propertyNameWithPrivate}}\s*(?:(?:(\?)|(\!))\s*)?(=|:|;|,|$))))|(?<=\})
patterns:
- include: '#variable-initializer'
- include: '#type-annotation'
- include: '#string'
- include: '#array-literal'
- include: '#numeric-literal'
- include: '#comment'
# function assignment |
# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>
- match: |-
(?x)({{propertyIdentifier}})(?:(\?)|(\!))?(?=\s*{{functionLikeAssignmentOrType}})
captures:
'1': { name: meta.definition.property.ts entity.name.function.ts }
'2': { name: keyword.operator.optional.ts }
'3': { name: keyword.operator.definiteassignment.ts }
- name: meta.definition.property.ts variable.object.property.ts
match: '{{propertyIdentifier}}'
- name: keyword.operator.optional.ts
match: \?
- name: keyword.operator.definiteassignment.ts
match: \!
variable-initializer:
patterns:
# if it is assignment with expression on same line, use end of line as end of scope
- begin: (?<!=|!)(=)(?!=)(?=\s*\S)(?!\s*.*=>\s*$)
beginCaptures:
'1': { name: keyword.operator.assignment.ts }
end: (?=$|^|[,);}\]]|({{startOfIdentifier}}(of|in)\s+))
patterns:
- include: '#expression'
# if the expression doesnt start on same line do not use end of line as end of unless the complete line is blank
- begin: (?<!=|!)(=)(?!=)
beginCaptures:
'1': { name: keyword.operator.assignment.ts }
end: (?=[,);}\]]|({{startOfIdentifier}}(of|in)\s+))|(?=^\s*$)|(?<![\|\&\+\-\*\/])(?<=\S)(?<!=)(?=\s*$)
patterns:
- include: '#expression'
#functions, methods, function expressions, arrows, indexers
function-declaration:
name: meta.function.ts
begin: '{{startOfDeclaration}}(?:(async)\s+)?(function\b)(?:\s*(\*))?(?:(?:\s+|(?<=\*))({{identifier}}))?\s*'
beginCaptures:
'1': { name: keyword.control.export.ts }
'2': { name: storage.modifier.ts }
'3': { name: storage.modifier.async.ts }
'4': { name: storage.type.function.ts }
'5': { name: keyword.generator.asterisk.ts }
'6': { name: meta.definition.function.ts entity.name.function.ts }
end: (?={{endOfStatement}})|(?<=\})
patterns:
- include: '#function-name'
- include: '#function-body'
function-expression:
name: meta.function.expression.ts
begin: '{{startOfIdentifier}}(?:(async)\s+)?(function\b)(?:\s*(\*))?(?:(?:\s+|(?<=\*))({{identifier}}))?\s*'
beginCaptures:
'1': { name: storage.modifier.async.ts }
'2': { name: storage.type.function.ts }
'3': { name: keyword.generator.asterisk.ts }
'4': { name: meta.definition.function.ts entity.name.function.ts }
end: (?=;)|(?<=\})
patterns:
- include: '#function-name'
- include: '#single-line-comment-consuming-line-ending'
- include: '#function-body'
function-name:
name: meta.definition.function.ts entity.name.function.ts
match: '{{identifier}}'
function-body:
patterns:
- include: '#comment'
- include: '#type-parameters'
- include: '#function-parameters'
- include: '#return-type'
- include: '#type-function-return-type'
- include: '#decl-block'
- name: keyword.generator.asterisk.ts
match: \*
method-declaration:
patterns:
# constructor signature
- name: meta.method.declaration.ts
begin: '(?x){{startOfIdentifier}}(?:\b(override)\s+)?(?:\b(public|private|protected)\s+)?(?:\b(abstract)\s+)?(?:\b(async)\s+)?\s*\b(constructor)\b(?!:){{endOfIdentifier}}'
beginCaptures:
'1': { name: storage.modifier.ts } # captures keyword (override)
'2': { name: storage.modifier.ts } # captures keyword (public or private or protected)
'3': { name: storage.modifier.ts } # captures keyword (abstract)
'4': { name: storage.modifier.async.ts } # captures keyword (async)
'5': { name: storage.type.ts } # captures keyword (constructor)
end: (?=\}|;|,|$)|(?<=\})
patterns:
- include: '#method-declaration-name'
- include: '#function-body'
# new or call signature
- name: meta.method.declaration.ts
begin: '(?x){{startOfIdentifier}}(?:\b(override)\s+)?(?:\b(public|private|protected)\s+)?(?:\b(abstract)\s+)?(?:\b(async)\s+)?(?:(?:\s*\b(new)\b(?!:){{endOfIdentifier}})|(?:(\*)\s*)?)(?=\s*({{typeParameters}})?[\(])'
beginCaptures:
'1': { name: storage.modifier.ts } # captures keyword (override)
'2': { name: storage.modifier.ts } # captures keyword (public or private or protected)
'3': { name: storage.modifier.ts } # captures keyword (abstract)
'4': { name: storage.modifier.async.ts } # captures keyword (async)
'5': { name: keyword.operator.new.ts } # captures keyword (new)
'6': { name: keyword.generator.asterisk.ts } # captures keyword (*)
end: (?=\}|;|,|$)|(?<=\})
patterns:
- include: '#method-declaration-name'
- include: '#function-body'
# method, accessor
- name: meta.method.declaration.ts
begin: '(?x){{startOfIdentifier}}(?:\b(override)\s+)?(?:\b(public|private|protected)\s+)?(?:\b(abstract)\s+)?(?:\b(async)\s+)?(?:\b(get|set)\s+)?(?:(\*)\s*)?(?=\s*({{propertyName}}\s*(\??))\s*({{typeParameters}})?[\(])'
beginCaptures:
'1': { name: storage.modifier.ts } # captures keyword (override)
'2': { name: storage.modifier.ts } # captures keyword (public or private or protected)
'3': { name: storage.modifier.ts } # captures keyword (abstract)
'4': { name: storage.modifier.async.ts } # captures keyword (async)
'5': { name: storage.type.property.ts } # captures keyword (get|set)
'6': { name: keyword.generator.asterisk.ts } # captures keyword (*)
end: (?=\}|;|,|$)|(?<=\})
patterns:
- include: '#method-declaration-name'
- include: '#function-body'
object-literal-method-declaration:
name: meta.method.declaration.ts
begin: '(?x){{startOfIdentifier}}(?:\b(async)\s+)?(?:\b(get|set)\s+)?(?:(\*)\s*)?(?=\s*({{propertyName}}\s*(\??))\s*({{typeParameters}})?[\(])'
beginCaptures:
'1': { name: storage.modifier.async.ts } # captures keyword (async)
'2': { name: storage.type.property.ts } # captures keyword (get|set)
'3': { name: keyword.generator.asterisk.ts } # captures keyword (*)
end: '(?=\}|;|,)|(?<=\})'
patterns:
- include: '#method-declaration-name'
- include: '#function-body'
- begin: '(?x){{startOfIdentifier}}(?:\b(async)\s+)?(?:\b(get|set)\s+)?(?:(\*)\s*)?(?=\s*({{propertyName}}\s*(\??))\s*({{typeParameters}})?[\(])'
beginCaptures:
'1': { name: storage.modifier.async.ts } # captures keyword (async)
'2': { name: storage.type.property.ts } # captures keyword (get|set)
'3': { name: keyword.generator.asterisk.ts } # captures keyword (*)
end: (?=\(|\<)
patterns:
- include: '#method-declaration-name'
method-declaration-name:
begin: (?x)(?={{propertyName}}\s*(\??)\s*[\(\<])
end: (?=\(|\<)
patterns:
- include: '#string'
- include: '#array-literal'
- include: '#numeric-literal'
- name: meta.definition.method.ts entity.name.function.ts
match: '{{identifier}}'
- name: keyword.operator.optional.ts
match: \?
arrow-function:
patterns:
# arrow with single parameter without parenthesis
- name: meta.arrow.ts
match: (?:{{startOfIdentifier}}(\basync)\s+)?({{identifier}})\s*(?==>)
captures:
'1': { name: storage.modifier.async.ts }
'2': { name: variable.parameter.ts }
# parenthesized arrow
- name: meta.arrow.ts
begin: >-
(?x)
(?:
{{startOfIdentifier}}(\basync)
)?
((?<![})!\]])\s*
(?=
{{arrowLookup}}
)
)
beginCaptures:
'1': { name: storage.modifier.async.ts }
end: '{{arrowFunctionEnd}}'
patterns:
- include: '#comment'
- include: '#type-parameters'
- include: '#function-parameters'
# return type of the arrow
- include: '#arrow-return-type'
- include: '#possibly-arrow-return-type'
# arrow operator
- name: meta.arrow.ts
begin: =>
beginCaptures:
'0': { name: storage.type.function.arrow.ts }
end: ((?<=\}|\S)(?<!=>)|((?!\{)(?=\S)))(?!\/[\/\*])
patterns:
- include: '#single-line-comment-consuming-line-ending'
- include: '#decl-block'
- include: '#expression'
indexer-declaration:
name: meta.indexer.declaration.ts
begin: (?:{{startOfIdentifier}}(readonly)\s*)?\s*(\[)\s*({{identifier}})\s*(?=:)
beginCaptures:
'1': { name: storage.modifier.ts }
'2': { name: meta.brace.square.ts }
'3': { name: variable.parameter.ts}
end: (\])\s*(\?\s*)?|$
endCaptures:
'1': { name: meta.brace.square.ts }
'2': { name: keyword.operator.optional.ts }
patterns:
- include: '#type-annotation'
indexer-mapped-type-declaration:
name: meta.indexer.mappedtype.declaration.ts
begin: (?:{{startOfIdentifier}}([+-])?(readonly)\s*)?\s*(\[)\s*({{identifier}})\s+(in)\s+
beginCaptures:
'1': { name: keyword.operator.type.modifier.ts }
'2': { name: storage.modifier.ts }
'3': { name: meta.brace.square.ts }
'4': { name: entity.name.type.ts }
'5': { name: keyword.operator.expression.in.ts }
end: (\])([+-])?\s*(\?\s*)?|$
endCaptures:
'1': { name: meta.brace.square.ts }
'2': { name: keyword.operator.type.modifier.ts }
'3': { name: keyword.operator.optional.ts }
patterns:
- match: '{{startOfIdentifier}}(as)\s+'
captures:
'1': { name: keyword.control.as.ts }
- include: '#type'
function-parameters:
name: meta.parameters.ts
begin: \(
beginCaptures:
'0': { name: punctuation.definition.parameters.begin.ts }
end: \)
endCaptures:
'0': { name: punctuation.definition.parameters.end.ts }
patterns:
- include: '#function-parameters-body'
# When updating this, also update the expression-inside-possibly-arrow-parens where this is inlined so that parameter-name can also be inlined
function-parameters-body:
patterns:
- include: '#comment'
- include: '#string'
- include: '#decorator'
- include: '#destructuring-parameter'
- include: '#parameter-name'
- include: '#parameter-type-annotation'
- include: '#variable-initializer'
- name: punctuation.separator.parameter.ts
match: ','
#class declaration and expression, interface
class-declaration:
name: meta.class.ts
begin: '{{startOfDeclaration}}\b(?:(abstract)\s+)?\b(class)\b(?=\s+|/[/*])'
beginCaptures:
'1': { name: keyword.control.export.ts }
'2': { name: storage.modifier.ts }
'3': { name: storage.modifier.ts }
'4': { name: storage.type.class.ts }
end: (?<=\})
patterns:
- include: '#class-declaration-or-expression-patterns'
class-expression:
name: meta.class.ts
# allows anonymous class
begin: '{{startOfIdentifier}}(?:(abstract)\s+)?(class)\b(?=\s+|[<{]|\/[\/*])'
beginCaptures:
'1': { name: storage.modifier.ts }
'2': { name: storage.type.class.ts }
end: (?<=\})
patterns:
- include: '#class-declaration-or-expression-patterns'
class-declaration-or-expression-patterns:
patterns:
- include: '#comment'
- include: '#class-or-interface-heritage' # Must be before object-name to consume the "extends" keyword.
- match: '{{identifier}}'
captures:
'0': { name: 'entity.name.type.class.ts' }
- include: '#type-parameters' # Must be applied after object-name e.g. interface KeyValuePair<K, V>
- include: '#class-or-interface-body'
interface-declaration:
name: meta.interface.ts
begin: '{{startOfDeclaration}}\b(?:(abstract)\s+)?\b(interface)\b(?=\s+|/[/*])'
beginCaptures:
'1': { name: keyword.control.export.ts }
'2': { name: storage.modifier.ts }
'3': { name: storage.modifier.ts }
'4': { name: storage.type.interface.ts }
end: (?<=\})
patterns:
- include: '#comment'
- include: '#class-or-interface-heritage' # Must be before object-name to consume the "extends" keyword.
- match: '{{identifier}}'
captures:
'0': { name: 'entity.name.type.interface.ts' }
- include: '#type-parameters' # Must be applied after object-name e.g. interface KeyValuePair<K, V>
- include: '#class-or-interface-body'
class-or-interface-heritage:
begin: '{{startOfIdentifier}}(?:\b(extends|implements)\b){{endOfIdentifier}}'
beginCaptures:
'1': { name: storage.modifier.ts }
end: (?=\{)
patterns:
- include: '#comment'
- include: '#class-or-interface-heritage'
- include: '#type-parameters'
# match expressions before matching identifiers
- include: '#expressionWithoutIdentifiers'
# identifiers are treated as inherited class
- match: '({{identifier}})\s*{{propertyAccess}}(?=\s*{{identifier}}(\s*{{propertyAccessPreIdentifier}}{{identifier}})*\s*)'
captures:
'1': { name: entity.name.type.module.ts }
'2': { name: punctuation.accessor.ts }
'3': { name: punctuation.accessor.optional.ts }
- match: ({{identifier}})
captures:
'1': { name: entity.other.inherited-class.ts }
# match punctuations of the expression
- include: '#expressionPunctuations'
class-or-interface-body:
begin: \{
beginCaptures:
'0': { name: punctuation.definition.block.ts }
end: \}
endCaptures:
'0': { name: punctuation.definition.block.ts }
patterns:
- include: '#comment'
- include: '#decorator'
# The : could most probably be end of ternary expression so to avoid matching expression following it as field declaration, explicitly match it as expression
- begin: (?<=:)\s*
end: (?=\s|[;),}\]:\-\+]|{{endOfStatement}})
patterns:
- include: '#expression'
- include: '#method-declaration'
- include: '#indexer-declaration'
- include: '#field-declaration'
- include: "#string"
- include: '#type-annotation'
- include: '#variable-initializer'
- include: '#access-modifier'
- include: '#property-accessor'
- include: '#async-modifier'
- include: '#after-operator-block-as-object-literal'
- include: '#decl-block'
- include: '#expression'
- include: '#punctuation-comma'
- include: '#punctuation-semicolon'
access-modifier:
name: storage.modifier.ts
match: '{{startOfIdentifier}}(abstract|declare|override|public|protected|private|readonly|static){{endOfIdentifier}}'
property-accessor:
name: storage.type.property.ts
match: '{{startOfIdentifier}}(accessor|get|set){{endOfIdentifier}}'
async-modifier:
name: storage.modifier.async.ts
match: '{{startOfIdentifier}}(async){{endOfIdentifier}}'
#enum
enum-declaration:
name: meta.enum.declaration.ts
begin: '{{startOfDeclaration}}(?:\b(const)\s+)?\b(enum)\s+({{identifier}})'
beginCaptures:
'1': { name: keyword.control.export.ts }
'2': { name: storage.modifier.ts}
'3': { name: storage.modifier.ts}
'4': { name: storage.type.enum.ts }
'5': { name: entity.name.type.enum.ts }
end: (?<=\})
patterns:
- include: '#comment'
- begin: \{
beginCaptures:
'0': { name: punctuation.definition.block.ts }
end: \}
endCaptures:
'0': { name: punctuation.definition.block.ts }
patterns:
- include: '#comment'
- begin: ({{identifier}})
beginCaptures:
'0': { name: variable.other.enummember.ts }
end: (?=,|\}|$)
patterns:
- include: '#comment'
- include: '#variable-initializer'
- begin: (?=({{nonIdentifierPropertyName}}))
end: (?=,|\}|$)
patterns:
- include: '#string'
- include: '#array-literal'
- include: '#comment'
- include: '#variable-initializer'
- include: '#punctuation-comma'
#namespace
namespace-declaration:
name: meta.namespace.declaration.ts
begin: (?:{{startOfDeclaration}}\b(namespace|module)\s+(?=[_$[:alpha:]"'`]))
beginCaptures:
'1': { name: keyword.control.export.ts }
'2': { name: storage.modifier.ts }
'3': { name: storage.type.namespace.ts }
end: (?<=\})|(?={{endOfStatement}})
patterns:
- include: '#comment'
- include: '#string'
- name: entity.name.type.module.ts
match: ({{identifier}})
- include: '#punctuation-accessor'
- include: '#decl-block'
#type alias
type-alias-declaration:
name: meta.type.declaration.ts
begin: '{{startOfDeclaration}}\b(type)\b\s+({{identifier}})\s*'
beginCaptures:
'1': { name: keyword.control.export.ts }
'2': { name: storage.modifier.ts }
'3': { name: storage.type.type.ts }
'4': { name: entity.name.type.alias.ts }
end: (?=\}|{{endOfStatement}})
patterns:
- include: '#comment'
- include: '#type-parameters'
- begin: '(=)\s*(intrinsic){{endOfIdentifier}}'
beginCaptures:
'1': { name: keyword.operator.assignment.ts }
'2': { name: keyword.control.intrinsic.ts }
end: (?=\}|{{endOfStatement}})
patterns:
- include: '#type'
- begin: '(=)\s*'
beginCaptures:
'1': { name: keyword.operator.assignment.ts }
end: (?=\}|{{endOfStatement}})
patterns:
- include: '#type'
#import and export
import-equals-declaration:
patterns:
- name: meta.import-equals.external.ts
begin: '{{startOfDeclaration}}\b(import)(?:\s+(type))?\s+({{identifier}})\s*(=)\s*(require)\s*(\()'
beginCaptures:
'1': { name: keyword.control.export.ts }
'2': { name: storage.modifier.ts }
'3': { name: keyword.control.import.ts }
'4': { name: keyword.control.type.ts }
'5': { name: variable.other.readwrite.alias.ts }
'6': { name: keyword.operator.assignment.ts }
'7': { name: keyword.control.require.ts }
'8': { name: meta.brace.round.ts }
end: \)
endCaptures:
'0': { name: meta.brace.round.ts }
patterns:
- include: '#comment'
- include: '#string'
- name: meta.import-equals.internal.ts
begin: '{{startOfDeclaration}}\b(import)(?:\s+(type))?\s+({{identifier}})\s*(=)\s*(?!require\b)'
beginCaptures:
'1': { name: keyword.control.export.ts }
'2': { name: storage.modifier.ts }
'3': { name: keyword.control.import.ts }
'4': { name: keyword.control.type.ts }
'5': { name: variable.other.readwrite.alias.ts }
'6': { name: keyword.operator.assignment.ts }
end: (?=;|$|^)
patterns:
- include: '#single-line-comment-consuming-line-ending'
- include: '#comment'
- match: ({{identifier}})\s*{{propertyAccess}}
captures:
'1': { name: entity.name.type.module.ts }
'2': { name: punctuation.accessor.ts }
'3': { name: punctuation.accessor.optional.ts }
- name: variable.other.readwrite.ts
match: ({{identifier}})
import-declaration:
name: meta.import.ts
begin: '{{startOfDeclaration}}\b(import)(?:\s+(type)(?!\s+from))?(?!\s*[:\(]){{endOfIdentifier}}'
beginCaptures:
'1': { name: keyword.control.export.ts }
'2': { name: storage.modifier.ts }
'3': { name: keyword.control.import.ts }
'4': { name: keyword.control.type.ts }
end: (?<!{{lookBehindImport}})(?=;|$|^)
patterns:
- include: '#single-line-comment-consuming-line-ending'
- include: '#comment'
- include: '#string'
- begin: (?<={{lookBehindImport}})(?!\s*["'])
end: \bfrom\b
endCaptures:
'0': { name: keyword.control.from.ts }
patterns:
- include: '#import-export-declaration'
- include: '#import-export-declaration'
export-declaration:
patterns:
- match: '{{startOfIdentifier}}(export)\s+(as)\s+(namespace)\s+({{identifier}})'
captures:
'1': { name: keyword.control.export.ts }
'2': { name: keyword.control.as.ts }
'3': { name: storage.type.namespace.ts }
'4': { name: entity.name.type.module.ts }
- name: meta.export.default.ts
begin: '{{startOfIdentifier}}(export)(?:\s+(type))?(?:(?:\s*(=))|(?:\s+(default)(?=\s+)))'
beginCaptures:
'1': { name: keyword.control.export.ts }
'2': { name: keyword.control.type.ts }
'3': { name: keyword.operator.assignment.ts }
'4': { name: keyword.control.default.ts }
end: (?=$|{{endOfStatement}})
patterns:
- include: '#interface-declaration'
- include: '#expression'
- name: meta.export.ts
begin: '{{startOfIdentifier}}(export)(?:\s+(type))?\b(?!(\$)|(\s*:))((?=\s*[\{*])|((?=\s*{{identifier}}(\s|,))(?!\s*{{constructsAndModifiers}})))'
beginCaptures:
'1': { name: keyword.control.export.ts }
'2': { name: keyword.control.type.ts }
end: (?=$|{{endOfStatement}})
patterns:
- include: '#import-export-declaration'
import-export-declaration:
patterns:
- include: '#comment'
- include: '#string'
- include: '#import-export-block'
- name: keyword.control.from.ts
match: \bfrom\b
- include: '#import-export-assert-clause'
- include: '#import-export-clause'
import-export-assert-clause:
begin: '{{startOfIdentifier}}(?:(with)|(assert))\s*(\{)'
beginCaptures:
'1': { name: keyword.control.with.ts }
'2': { name: keyword.control.assert.ts }
'3': { name: punctuation.definition.block.ts }
end: \}
endCaptures:
'0': { name: punctuation.definition.block.ts }
patterns:
- include: '#comment'
- include: '#string'
- name: meta.object-literal.key.ts
match: (?:{{identifier}})\s*(?=({{inlineComment}}\s*)*:)
- name: punctuation.separator.key-value.ts
match: ':'
import-export-block:
name: meta.block.ts
begin: \{
beginCaptures:
'0': { name: punctuation.definition.block.ts }
end: \}
endCaptures:
'0': { name: punctuation.definition.block.ts }
patterns:
- include: '#import-export-clause'
import-export-clause:
patterns:
- include: '#comment'
#(default|*|name) as alias
- match: '{{startOfIdentifier}}(?:(?:(\btype)\s+)?(?:(\bdefault)|(\*)|(\b{{identifier}})|({{quotedStrings}})))\s+(as)\s+(?:(default{{endOfIdentifier}})|({{identifier}})|({{quotedStrings}}))'
captures:
'1': { name: keyword.control.type.ts }
'2': { name: keyword.control.default.ts }
'3': { name: constant.language.import-export-all.ts }
'4': { name: variable.other.readwrite.ts }
'5': { name: string.quoted.alias.ts }
'12': { name: keyword.control.as.ts }
'13': { name: keyword.control.default.ts }
'14': { name: variable.other.readwrite.alias.ts }
'15': { name: string.quoted.alias.ts }
- include: '#punctuation-comma'
- name: constant.language.import-export-all.ts
match: \*
- name: keyword.control.default.ts
match: \b(default)\b
- match: '(?:(\btype)\s+)?(?:({{identifier}})|({{quotedStrings}}))'
captures:
'1': { name: keyword.control.type.ts }
'2': { name: variable.other.readwrite.alias.ts }
'3': { name: string.quoted.alias.ts }
#control statements and loops
switch-statement:
name: switch-statement.expr.ts
begin: '{{startOfIdentifier}}(?=\bswitch\s*\()'
end: \}
endCaptures:
'0': {name: punctuation.definition.block.ts}
patterns:
- include: '#comment'
- name: switch-expression.expr.ts
begin: '{{startOfIdentifier}}(switch)\s*(\()'
beginCaptures:
'1': { name: keyword.control.switch.ts }
'2': { name: meta.brace.round.ts }
end: \)
endCaptures:
'0': { name: meta.brace.round.ts }
patterns:
- include: '#expression'
- name: switch-block.expr.ts
begin: \{
beginCaptures:
'0': { name: punctuation.definition.block.ts }
end: (?=\})
patterns:
- name: case-clause.expr.ts
begin: '{{startOfIdentifier}}(case|default(?=:)){{endOfIdentifier}}'
beginCaptures:
'1': { name: keyword.control.switch.ts }
end: (?=:)
patterns:
- include: '#expression'
# case block
- begin: (:)\s*(\{)
beginCaptures:
'1': { name: case-clause.expr.ts punctuation.definition.section.case-statement.ts }
'2': { name: meta.block.ts punctuation.definition.block.ts }
end: \}
endCaptures:
'0': { name: meta.block.ts punctuation.definition.block.ts }
contentName: meta.block.ts
patterns:
- include: '#statements'
- match: (:)
captures:
'0': { name: case-clause.expr.ts punctuation.definition.section.case-statement.ts }
- include: '#statements'
for-loop:
begin: '{{startOfIdentifier}}for(?=((\s+|(\s*{{inlineComment}}\s*))await)?\s*({{inlineComment}}\s*)?(\())'
beginCaptures:
'0': { name: keyword.control.loop.ts }
end: (?<=\))
patterns:
- include: '#comment'
- name: keyword.control.loop.ts
match: await
- begin: \(
beginCaptures:
'0': { name: meta.brace.round.ts }
end: \)
endCaptures:
'0': { name: meta.brace.round.ts }
patterns:
- include: '#var-expr'
- include: '#expression'
- include: '#punctuation-semicolon'
# Match if statement without block specially to handle regexp
if-statement:
patterns:
- begin: '{{startOfIdentifier}}(?=\bif\s*{{matchingParenthesis}}\s*(?!\{))'
end: (?=;|$|\})
patterns:
- include: '#comment'
- begin: '{{startOfIdentifier}}(if)\s*(\()'
beginCaptures:
'1': { name: keyword.control.conditional.ts }
'2': { name: meta.brace.round.ts }
end: \)
endCaptures:
'0': { name: meta.brace.round.ts }
patterns:
- include: '#expression'
- name: string.regexp.ts
begin: (?<=\))\s*{{completeRegexp}}
beginCaptures:
'0': { name: punctuation.definition.string.begin.ts }
end: (/)([dgimsuvy]*)
endCaptures:
'1': { name: punctuation.definition.string.end.ts }
'2': { name: keyword.other.ts }
patterns:
- include: '#regexp'
- include: '#statements'
#blocks
decl-block:
name: meta.block.ts
begin: \{
beginCaptures:
'0': { name: punctuation.definition.block.ts }
end: \}
endCaptures:
'0': { name: punctuation.definition.block.ts }
patterns:
- include: '#statements'
#object literals
after-operator-block-as-object-literal:
name: meta.objectliteral.ts
begin: (?<!\+\+|--)(?<=[:=(,\[?+!>]|{{lookBehindAwait}}|{{lookBehindReturn}}|{{lookBehindYield}}|{{lookBehindThrow}}|{{lookBehindIn}}|{{lookBehindOf}}|{{lookBehindTypeof}}|&&|\|\||\*)\s*(\{)
beginCaptures:
'1': { name: punctuation.definition.block.ts }
end: \}
endCaptures:
'0': { name: punctuation.definition.block.ts }
patterns:
- include: '#object-member'
object-literal:
name: meta.objectliteral.ts
begin: \{
beginCaptures:
'0': { name: punctuation.definition.block.ts }
end: \}
endCaptures:
'0': { name: punctuation.definition.block.ts }
patterns:
- include: '#object-member'
object-member:
patterns:
- include: '#comment'
- include: '#object-literal-method-declaration'
- name: meta.object.member.ts meta.object-literal.key.ts
begin: (?=\[)
end: (?=:)|((?<=[\]])(?=\s*[\(\<]))
patterns:
- include: '#comment'
- include: '#array-literal'
- name: meta.object.member.ts meta.object-literal.key.ts
begin: (?=[\'\"\`])
end: (?=:)|((?<=[\'\"\`])(?=((\s*[\(\<,}])|(\s+(as|satisifies)\s+))))
patterns:
- include: '#comment'
- include: '#string'
- name: meta.object.member.ts meta.object-literal.key.ts
begin: (?x)(?={{anyNumber}})
end: (?=:)|(?=\s*([\(\<,}])|(\s+as|satisifies\s+))
patterns:
- include: '#comment'
- include: '#numeric-literal'
- name: meta.method.declaration.ts
begin: (?<=[\]\'\"\`])(?=\s*[\(\<])
end: (?=\}|;|,)|(?<=\})
patterns:
- include: '#function-body'
- name: meta.object.member.ts
match: (?![_$[:alpha:]])([[:digit:]]+)\s*(?=({{inlineComment}}\s*)*:)
captures:
'0': { name: meta.object-literal.key.ts }
'1': { name: constant.numeric.decimal.ts }
- name: meta.object.member.ts
match: |-
(?x)(?:({{identifier}})\s*(?=({{inlineComment}}\s*)*:(\s*{{inlineComment}})*{{functionOrArrowLookup}}))
captures:
'0': { name: meta.object-literal.key.ts }
'1': { name: entity.name.function.ts }
- name: meta.object.member.ts
match: (?:{{identifier}})\s*(?=({{inlineComment}}\s*)*:)
captures:
'0': { name: meta.object-literal.key.ts }
- name: meta.object.member.ts
begin: \.\.\.
beginCaptures:
'0': { name: keyword.operator.spread.ts }
end: (?=,|\})
patterns:
- include: '#expression'
- name: meta.object.member.ts
match: ({{identifier}})\s*(?=,|\}|$|\/\/|\/\*)
captures:
'1': { name: variable.other.readwrite.ts }
- name: meta.object.member.ts
match: '{{startOfIdentifier}}(as)\s+(const)(?=\s*([,}]|$))'
captures:
'1': { name: keyword.control.as.ts }
'2': { name: storage.modifier.ts }
- name: meta.object.member.ts
begin: '{{startOfIdentifier}}(?:(as)|(satisfies))\s+'
beginCaptures:
'1': { name: keyword.control.as.ts }
'2': { name: keyword.control.satisfies.ts }
end: (?={{lookAheadEndOfType}}|^|({{startOfIdentifier}}(as|satisifies)\s+))
patterns:
- include: '#type'
- name: meta.object.member.ts
begin: (?={{identifier}}\s*=)
end: (?=,|\}|$|\/\/|\/\*)
patterns:
- include: '#expression'
# object member body:
- name: meta.object.member.ts
begin: ':'
beginCaptures:
'0': { name: meta.object-literal.key.ts punctuation.separator.key-value.ts }
end: (?=,|\})
patterns:
- begin: '{{lookBehindOfObjectMemberPossiblyMultilineArrow}}\s*(async)?(?=\s*{{typeParameters}}\(\s*{{possiblyMultilineArrowWParamters}})'
beginCaptures:
'1': { name: storage.modifier.async.ts }
end: (?<=\))
patterns:
- include: '#type-parameters'
- begin: \(
beginCaptures:
'0': { name: meta.brace.round.ts }
end: \)
endCaptures:
'0': { name: meta.brace.round.ts }
patterns:
- include: '#expression-inside-possibly-arrow-parens'
- begin: '{{lookBehindOfObjectMemberPossiblyMultilineArrow}}\s*(async)?\s*(\()(?=\s*{{possiblyMultilineArrowWParamters}})'
beginCaptures:
'1': { name: storage.modifier.async.ts }
'2': { name: meta.brace.round.ts }
end: \)
endCaptures:
'0': { name: meta.brace.round.ts }
patterns:
- include: '#expression-inside-possibly-arrow-parens'
- begin: '{{lookBehindOfObjectMemberPossiblyMultilineArrow}}\s*(async)?\s*(?=\<\s*$)'
beginCaptures:
'1': { name: storage.modifier.async.ts }
end: (?<=\>)
patterns:
- include: '#type-parameters'
- begin: '(?<=\>)\s*(\()(?=\s*{{possiblyMultilineArrowWParamters}})'
beginCaptures:
'1': { name: meta.brace.round.ts }
end: \)
endCaptures:
'0': { name: meta.brace.round.ts }
patterns:
- include: '#expression-inside-possibly-arrow-parens'
- include: '#possibly-arrow-return-type'
- include: '#expression'
- include: '#punctuation-comma'
- include: '#decl-block'
#ternary expression
ternary-expression:
begin: (?!\?\.\s*[^[:digit:]])(\?)(?!\?)
beginCaptures:
'1': { name: keyword.operator.ternary.ts }
end: \s*(:)
endCaptures:
'1': { name: keyword.operator.ternary.ts }
patterns:
- include: '#expression'
#function call and new expression
function-call:
patterns:
- begin: (?={{functionCallTarget}}{{functionCallLookup}})
end: (?<=\))(?!{{functionCallTarget}}{{functionCallLookup}})
patterns:
- name: meta.function-call.ts
begin: (?={{functionCallNamedTarget}})
end: (?={{functionCallLookup}})
patterns:
- include: '#function-call-target'
- include: '#comment'
- include: '#function-call-optionals'
- include: '#type-arguments'
- include: '#paren-expression'
- begin: (?={{functionCallTarget}}{{possiblyMultilineTypeArgument}})
end: (?<=\>)(?!{{functionCallTarget}}{{possiblyMultilineTypeArgument}})
patterns:
- name: meta.function-call.ts
begin: (?={{functionCallNamedTarget}})
end: (?={{possiblyMultilineTypeArgument}})
patterns:
- include: '#function-call-target'
- include: '#comment'
- include: '#function-call-optionals'
- include: '#type-arguments'
function-call-target:
patterns:
- include: '#support-function-call-identifiers'
- name: entity.name.function.ts
match: ({{propertyIdentifier}})
function-call-optionals:
patterns:
- name: meta.function-call.ts punctuation.accessor.optional.ts
match: \?\.
- name: meta.function-call.ts keyword.operator.definiteassignment.ts
match: \!
support-function-call-identifiers:
patterns:
- include: '#literal'
- include: '#support-objects'
- include: '#object-identifiers'
- include: '#punctuation-accessor'
- name: keyword.operator.expression.import.ts
match: (?:{{startOfIdentifier}}import(?=\s*[\(]\s*[\"\'\`]))
new-expr:
name: new.expr.ts
begin: '{{startOfIdentifier}}(new){{endOfIdentifier}}'
beginCaptures:
'1': { name: keyword.operator.new.ts }
end: (?<=\))|(?={{lookAheadEndOfType}}|({{startOfIdentifier}}new{{endOfIdentifier}})|({{startOfIdentifier}}function((\s+{{identifier}})|(\s*[\(]))))
patterns:
- include: '#expression'
instanceof-expr:
begin: '{{startOfIdentifier}}(instanceof){{endOfIdentifier}}'
beginCaptures:
'1': { name: keyword.operator.expression.instanceof.ts }
end: (?<=\))|(?={{lookAheadEndOfType}}|(===|!==|==|!=)|(([\&\~\^\|]\s*)?{{identifier}}\s+instanceof{{endOfIdentifier}})|({{startOfIdentifier}}function((\s+{{identifier}})|(\s*[\(]))))
patterns:
- include: '#type'
# when ( is followed by end of line, it could be arrow parameter decarations, so inside this match as if parameter falling back to expression
# but do this only from expression and as last resort
paren-expression-possibly-arrow:
patterns:
- begin: '{{lookBehindOfPossiblyMultilineArrowWithDestructuring}}\s*(async)?(?=\s*({{typeParameters}})?\(\s*{{possiblyMultilineArrowWParamters}})'
beginCaptures:
'1': { name: storage.modifier.async.ts }
end: (?<=\))
patterns:
- include: '#paren-expression-possibly-arrow-with-typeparameters'
- begin: '{{lookBehindOfPossiblyMultilineArrow}}\s*(async)?(?=\s*{{possiblyMultilineArrowExpressionBeforeEndOfLine}}\s*$)'
beginCaptures:
'1': { name: storage.modifier.async.ts }
end: (?<=\))
patterns:
- include: '#paren-expression-possibly-arrow-with-typeparameters'
- include: '#possibly-arrow-return-type'
paren-expression-possibly-arrow-with-typeparameters:
patterns:
- include: '#type-parameters'
- begin: \(
beginCaptures:
'0': { name: meta.brace.round.ts }
end: \)
endCaptures:
'0': { name: meta.brace.round.ts }
patterns:
- include: '#expression-inside-possibly-arrow-parens'
expression-inside-possibly-arrow-parens:
patterns:
- include: '#expressionWithoutIdentifiers'
- include: '#comment'
- include: '#string'
- include: '#decorator'
- include: '#destructuring-parameter'
- match: '{{startOfIdentifier}}(override|public|protected|private|readonly)\s+(?=(override|public|protected|private|readonly)\s+)'
captures:
'1': { name: storage.modifier.ts }
- match: |-
(?x)(?:{{startOfIdentifier}}(override|public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:){{startOfIdentifier}}(?:(this)|({{identifier}})){{endOfIdentifier}}\s*(\??)(?={{functionLikeAssignmentOrType}})
captures:
'1': { name: storage.modifier.ts }
'2': { name: keyword.operator.rest.ts }
'3': { name: entity.name.function.ts variable.language.this.ts }
'4': { name: entity.name.function.ts }
'5': { name: keyword.operator.optional.ts }
- match: |-
(?x)(?:{{startOfIdentifier}}(override|public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:){{startOfIdentifier}}(?:(this)|({{identifier}})){{endOfIdentifier}}\s*(\??)(?=\s*[:,]|$)
captures:
'1': { name: storage.modifier.ts }
'2': { name: keyword.operator.rest.ts }
'3': { name: variable.parameter.ts variable.language.this.ts }
'4': { name: variable.parameter.ts }
'5': { name: keyword.operator.optional.ts }
- include: '#type-annotation'
- include: '#variable-initializer'
- name: punctuation.separator.parameter.ts
match: ','
- include: '#identifiers'
- include: '#expressionPunctuations'
paren-expression:
begin: \(
beginCaptures:
'0': {name: meta.brace.round.ts }
end: \)
endCaptures:
'0': {name: meta.brace.round.ts }
patterns:
- include: '#expression'
#cast expression
cast:
patterns:
- name: cast.expr.ts
match: \s*(<)\s*(const)\s*(>)
captures:
'1': { name: meta.brace.angle.ts }
'2': { name: storage.modifier.ts }
'3': { name: meta.brace.angle.ts }
- name: cast.expr.ts
# We need to differentiate between the relational '<' operator and the beginning of a type assertion/cast using the surrounding context.
# If '<' is preceeded by 'return', 'throw', 'yield', or 'await', it's most likely a type assertion
# If '=', '(', ',', ':', or '>' are followed by a '<', it is also likely a type assertion as otherwise it would be a syntax error
# '<=' and '<<=' are cannot be type assertions, as they are assignment operators.
begin: (?:(?<!\+\+|--)(?<={{lookBehindReturn}}|{{lookBehindThrow}}|{{lookBehindYield}}|{{lookBehindAwait}}|{{lookBehindDefault}}|[=(,:>*?\&\|\^]|[^_$[:alnum:]](?:\+\+|\-\-)|[^\+]\+|[^\-]\-))\s*(<)(?!<?\=)(?!\s*$)
beginCaptures:
'1': { name: meta.brace.angle.ts }
end: (\>)
endCaptures:
'1': { name: meta.brace.angle.ts }
patterns:
- include: '#type'
- name: cast.expr.ts
# Specialize the pattern that is allowed at the beginning of the new line to treat as cast
# < appears on new line allow only <Identifier> as type assertion
# This allows treating '<' on new line as relation operator in other cases.
# People writing one operator on new line and second one on same line should be rare to allow this.
begin: (?:(?<=^))\s*(<)(?={{identifier}}\s*>)
beginCaptures:
'1': { name: meta.brace.angle.ts }
end: (\>)
endCaptures:
'1': { name: meta.brace.angle.ts }
patterns:
- include: '#type'
#expression operators
expression-operators:
patterns:
- name: keyword.control.flow.ts
match: '{{startOfIdentifier}}(await){{endOfIdentifier}}'
- begin: '{{startOfIdentifier}}(yield){{endOfIdentifier}}(?=\s*{{inlineComment}}\s*\*)'
beginCaptures:
'1': { name: keyword.control.flow.ts }
end: \*
endCaptures:
'0': { name: keyword.generator.asterisk.ts }
patterns:
- include: '#comment'
- match: '{{startOfIdentifier}}(yield){{endOfIdentifier}}(?:\s*(\*))?'
captures:
'1': { name: keyword.control.flow.ts }
'2': { name: keyword.generator.asterisk.ts }
- name: keyword.operator.expression.delete.ts
match: '{{startOfIdentifier}}delete{{endOfIdentifier}}'
- name: keyword.operator.expression.in.ts
match: '{{startOfIdentifier}}in{{endOfIdentifier}}(?!\()'
- name: keyword.operator.expression.of.ts
match: '{{startOfIdentifier}}of{{endOfIdentifier}}(?!\()'
- name: keyword.operator.expression.instanceof.ts
match: '{{startOfIdentifier}}instanceof{{endOfIdentifier}}'
- name: keyword.operator.new.ts
match: '{{startOfIdentifier}}new{{endOfIdentifier}}'
- include: '#typeof-operator'
- name: keyword.operator.expression.void.ts
match: '{{startOfIdentifier}}void{{endOfIdentifier}}'
#handle as operator specifically to be recognized only if it is 'as' followed by space
- match: '{{startOfIdentifier}}(as)\s+(const)(?=\s*($|[;,:})\]]))'
captures:
'1': { name: keyword.control.as.ts }
'2': { name: storage.modifier.ts }
- begin: '{{startOfIdentifier}}(?:(as)|(satisfies))\s+'
beginCaptures:
'1': { name: keyword.control.as.ts }
'2': { name: keyword.control.satisfies.ts }
end: (?=^|{{lookAheadEndOfType}}|({{startOfIdentifier}}(as|satisfies)\s+)|(\s+\<))
patterns:
- include: '#type'
- name: keyword.operator.spread.ts
match: \.\.\.
- name: keyword.operator.assignment.compound.ts
match: \*=|(?<!\()/=|%=|\+=|\-=
- name: keyword.operator.assignment.compound.bitwise.ts
match: \&=|\^=|<<=|>>=|>>>=|\|=
- name: keyword.operator.bitwise.shift.ts
match: <<|>>>|>>
- name: keyword.operator.comparison.ts
match: ===|!==|==|!=
- name: keyword.operator.relational.ts
match: <=|>=|<>|<|>
- match: (?<=[_$[:alnum:]])(\!)\s*(?:(/=)|(?:(/)(?![/*])))
captures:
'1': { name: keyword.operator.logical.ts }
'2': { name: keyword.operator.assignment.compound.ts }
'3': { name: keyword.operator.arithmetic.ts }
- name: keyword.operator.logical.ts
match: \!|&&|\|\||\?\?
- name: keyword.operator.bitwise.ts
match: \&|~|\^|\|
- name: keyword.operator.assignment.ts
match: \=
- name: keyword.operator.decrement.ts
match: --
- name: keyword.operator.increment.ts
match: \+\+
- name: keyword.operator.arithmetic.ts
match: '%|\*|/|-|\+'
# capture the arithmetic sign followed by variable or parenthesized expression so that it is not interpreted as regex
- begin: (?<=[_$[:alnum:])\]])\s*(?=({{inlineComment}}\s*)+(?:(/=)|(?:(/)(?![/*]))))
end: (?:(/=)|(?:(/)(?!\*([^\*]|(\*[^\/]))*\*\/)))
endCaptures:
'1': { name: keyword.operator.assignment.compound.ts }
'2': { name: keyword.operator.arithmetic.ts }
patterns:
- include: '#comment'
- match: (?<=[_$[:alnum:])\]])\s*(?:(/=)|(?:(/)(?![/*])))
captures:
'1': { name: keyword.operator.assignment.compound.ts }
'2': { name: keyword.operator.arithmetic.ts }
typeof-operator:
begin: '{{startOfIdentifier}}typeof{{endOfIdentifier}}'
beginCaptures:
'0': { name: keyword.operator.expression.typeof.ts }
end: (?=[,);}\]=>:&|{\?]|(extends\s+)|$|{{endOfStatement}})
patterns:
- include: '#type-arguments'
- include: '#expression'
#literals
literal:
patterns:
- include: '#numeric-literal'
- include: '#boolean-literal'
- include: '#null-literal'
- include: '#undefined-literal'
- include: '#numericConstant-literal'
- include: '#array-literal'
- include: '#this-literal'
- include: '#super-literal'
array-literal:
name: meta.array.literal.ts
begin: \s*(\[)
beginCaptures:
'1': { name: meta.brace.square.ts }
end: \]
endCaptures:
'0': { name: meta.brace.square.ts }
patterns:
- include: '#expression'
- include: '#punctuation-comma'
# With respect to seperators, we allow mroe than is syntacically valid below
# (multiple consecutive and trailing ones are errors), to be more graceful
# when the code contains errors
numeric-literal:
patterns:
- name: constant.numeric.hex.ts
match: '{{hexNumber}}'
captures:
'1': { name: storage.type.numeric.bigint.ts }
- name: constant.numeric.binary.ts
match: '{{binaryNumber}}'
captures:
'1': { name: storage.type.numeric.bigint.ts }
- name: constant.numeric.octal.ts
match: '{{octalNumber}}'
captures:
'1': { name: storage.type.numeric.bigint.ts }
- match: |-
(?x)
{{decimalNumber}}
captures:
'0': {name: constant.numeric.decimal.ts}
'1': {name: meta.delimiter.decimal.period.ts}
'2': { name: storage.type.numeric.bigint.ts }
'3': {name: meta.delimiter.decimal.period.ts}
'4': { name: storage.type.numeric.bigint.ts }
'5': {name: meta.delimiter.decimal.period.ts}
'6': { name: storage.type.numeric.bigint.ts }
'7': { name: storage.type.numeric.bigint.ts }
'8': {name: meta.delimiter.decimal.period.ts}
'9': { name: storage.type.numeric.bigint.ts }
'10': {name: meta.delimiter.decimal.period.ts}
'11': { name: storage.type.numeric.bigint.ts }
'12': {name: meta.delimiter.decimal.period.ts}
'13': { name: storage.type.numeric.bigint.ts }
'14': { name: storage.type.numeric.bigint.ts }
boolean-literal:
patterns:
- name: constant.language.boolean.true.ts
match: '{{startOfIdentifier}}true{{endOfIdentifier}}'
- name: constant.language.boolean.false.ts
match: '{{startOfIdentifier}}false{{endOfIdentifier}}'
null-literal:
name: constant.language.null.ts
match: '{{startOfIdentifier}}null{{endOfIdentifier}}'
this-literal:
name: variable.language.this.ts
match: '{{startOfIdentifier}}this\b(?!\$)'
super-literal:
name: variable.language.super.ts
match: '{{startOfIdentifier}}super\b(?!\$)'
undefined-literal:
name: constant.language.undefined.ts
match: '{{startOfIdentifier}}undefined{{endOfIdentifier}}'
numericConstant-literal:
patterns:
- name: constant.language.nan.ts
match: '{{startOfIdentifier}}NaN{{endOfIdentifier}}'
- name: constant.language.infinity.ts
match: '{{startOfIdentifier}}Infinity{{endOfIdentifier}}'
#identifiers, support variables
support-objects:
patterns:
- name: variable.language.arguments.ts
match: '{{startOfIdentifier}}(arguments)\b(?!\$)'
# builtins
- name: support.class.builtin.ts
match: |-
(?x){{startOfIdentifier}}(Array|ArrayBuffer|Atomics|BigInt|BigInt64Array|BigUint64Array|Boolean|DataView|Date|Float32Array
|Float64Array|Function|Generator|GeneratorFunction|Int8Array|Int16Array|Int32Array|Intl|Map|Number|Object|Proxy
|Reflect|RegExp|Set|SharedArrayBuffer|SIMD|String|Symbol|TypedArray
|Uint8Array|Uint16Array|Uint32Array|Uint8ClampedArray|WeakMap|WeakSet)\b(?!\$)
- name: support.class.error.ts
match: '{{startOfIdentifier}}((Eval|Internal|Range|Reference|Syntax|Type|URI)?Error)\b(?!\$)'
- name: support.class.promise.ts
match: '{{startOfIdentifier}}(Promise)\b(?!\$)'
# known builtin function calls
- name: support.function.ts
match: |-
(?x){{startOfIdentifier}}(clear(Interval|Timeout)|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|escape|eval|
isFinite|isNaN|parseFloat|parseInt|require|set(Interval|Timeout)|super|unescape|uneval)(?=\s*\()
# Math
- match: |-
(?x){{startOfIdentifier}}(Math)(?:\s*{{propertyAccess}}\s*(?:
(abs|acos|acosh|asin|asinh|atan|atan2|atanh|cbrt|ceil|clz32|cos|cosh|exp|
expm1|floor|fround|hypot|imul|log|log10|log1p|log2|max|min|pow|random|
round|sign|sin|sinh|sqrt|tan|tanh|trunc)
|
(E|LN10|LN2|LOG10E|LOG2E|PI|SQRT1_2|SQRT2)))?\b(?!\$)
captures:
'1': { name: support.constant.math.ts }
'2': { name: punctuation.accessor.ts }
'3': { name: punctuation.accessor.optional.ts }
'4': { name: support.function.math.ts }
'5': { name: support.constant.property.math.ts }
# console
- match: |-
(?x){{startOfIdentifier}}(console)(?:\s*{{propertyAccess}}\s*(
assert|clear|count|debug|dir|error|group|groupCollapsed|groupEnd|info|log
|profile|profileEnd|table|time|timeEnd|timeStamp|trace|warn))?\b(?!\$)
captures:
'1': { name: support.class.console.ts }
'2': { name: punctuation.accessor.ts }
'3': { name: punctuation.accessor.optional.ts }
'4': { name: support.function.console.ts }
# JSON
- match: '{{startOfIdentifier}}(JSON)(?:\s*{{propertyAccess}}\s*(parse|stringify))?\b(?!\$)'
captures:
'1': { name: support.constant.json.ts }
'2': { name: punctuation.accessor.ts }
'3': { name: punctuation.accessor.optional.ts }
'4': { name: support.function.json.ts }
# import meta
- match: '{{startOfIdentifier}}(import)\s*{{propertyAccess}}\s*(meta)\b(?!\$)'
captures:
'1': { name: keyword.control.import.ts }
'2': { name: punctuation.accessor.ts }
'3': { name: punctuation.accessor.optional.ts }
'4': { name: support.variable.property.importmeta.ts }
# new target
- match: '{{startOfIdentifier}}(new)\s*{{propertyAccess}}\s*(target)\b(?!\$)'
captures:
'1': { name: keyword.operator.new.ts }
'2': { name: punctuation.accessor.ts }
'3': { name: punctuation.accessor.optional.ts }
'4': { name: support.variable.property.target.ts }
# DOM
- match: |-
(?x) {{propertyAccess}} \s* (?:
(?:(constructor|length|prototype|__proto__)\b(?!\$|\s*{{typeParameters}}?\())
|
(?:(EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY)\b(?!\$)))
captures:
'1': { name: punctuation.accessor.ts }
'2': { name: punctuation.accessor.optional.ts }
'3': { name: support.variable.property.ts }
'4': { name: support.constant.ts }
- match: |-
(?x) {{startOfIdentifier}} \b (?:
(document|event|navigator|performance|screen|window)
|
(AnalyserNode|ArrayBufferView|Attr|AudioBuffer|AudioBufferSourceNode|AudioContext|AudioDestinationNode|AudioListener
|AudioNode|AudioParam|BatteryManager|BeforeUnloadEvent|BiquadFilterNode|Blob|BufferSource|ByteString|CSS|CSSConditionRule
|CSSCounterStyleRule|CSSGroupingRule|CSSMatrix|CSSMediaRule|CSSPageRule|CSSPrimitiveValue|CSSRule|CSSRuleList|CSSStyleDeclaration
|CSSStyleRule|CSSStyleSheet|CSSSupportsRule|CSSValue|CSSValueList|CanvasGradient|CanvasImageSource|CanvasPattern
|CanvasRenderingContext2D|ChannelMergerNode|ChannelSplitterNode|CharacterData|ChromeWorker|CloseEvent|Comment|CompositionEvent
|Console|ConvolverNode|Coordinates|Credential|CredentialsContainer|Crypto|CryptoKey|CustomEvent|DOMError|DOMException
|DOMHighResTimeStamp|DOMImplementation|DOMString|DOMStringList|DOMStringMap|DOMTimeStamp|DOMTokenList|DataTransfer
|DataTransferItem|DataTransferItemList|DedicatedWorkerGlobalScope|DelayNode|DeviceProximityEvent|DirectoryEntry
|DirectoryEntrySync|DirectoryReader|DirectoryReaderSync|Document|DocumentFragment|DocumentTouch|DocumentType|DragEvent
|DynamicsCompressorNode|Element|Entry|EntrySync|ErrorEvent|Event|EventListener|EventSource|EventTarget|FederatedCredential
|FetchEvent|File|FileEntry|FileEntrySync|FileException|FileList|FileReader|FileReaderSync|FileSystem|FileSystemSync
|FontFace|FormData|GainNode|Gamepad|GamepadButton|GamepadEvent|Geolocation|GlobalEventHandlers|HTMLAnchorElement
|HTMLAreaElement|HTMLAudioElement|HTMLBRElement|HTMLBaseElement|HTMLBodyElement|HTMLButtonElement|HTMLCanvasElement
|HTMLCollection|HTMLContentElement|HTMLDListElement|HTMLDataElement|HTMLDataListElement|HTMLDialogElement|HTMLDivElement
|HTMLDocument|HTMLElement|HTMLEmbedElement|HTMLFieldSetElement|HTMLFontElement|HTMLFormControlsCollection|HTMLFormElement
|HTMLHRElement|HTMLHeadElement|HTMLHeadingElement|HTMLHtmlElement|HTMLIFrameElement|HTMLImageElement|HTMLInputElement
|HTMLKeygenElement|HTMLLIElement|HTMLLabelElement|HTMLLegendElement|HTMLLinkElement|HTMLMapElement|HTMLMediaElement
|HTMLMetaElement|HTMLMeterElement|HTMLModElement|HTMLOListElement|HTMLObjectElement|HTMLOptGroupElement|HTMLOptionElement
|HTMLOptionsCollection|HTMLOutputElement|HTMLParagraphElement|HTMLParamElement|HTMLPreElement|HTMLProgressElement
|HTMLQuoteElement|HTMLScriptElement|HTMLSelectElement|HTMLShadowElement|HTMLSourceElement|HTMLSpanElement|HTMLStyleElement
|HTMLTableCaptionElement|HTMLTableCellElement|HTMLTableColElement|HTMLTableDataCellElement|HTMLTableElement|HTMLTableHeaderCellElement
|HTMLTableRowElement|HTMLTableSectionElement|HTMLTextAreaElement|HTMLTimeElement|HTMLTitleElement|HTMLTrackElement
|HTMLUListElement|HTMLUnknownElement|HTMLVideoElement|HashChangeEvent|History|IDBCursor|IDBCursorWithValue|IDBDatabase
|IDBEnvironment|IDBFactory|IDBIndex|IDBKeyRange|IDBMutableFile|IDBObjectStore|IDBOpenDBRequest|IDBRequest|IDBTransaction
|IDBVersionChangeEvent|IIRFilterNode|IdentityManager|ImageBitmap|ImageBitmapFactories|ImageData|Index|InputDeviceCapabilities
|InputEvent|InstallEvent|InstallTrigger|KeyboardEvent|LinkStyle|LocalFileSystem|LocalFileSystemSync|Location|MIDIAccess
|MIDIConnectionEvent|MIDIInput|MIDIInputMap|MIDIOutputMap|MediaElementAudioSourceNode|MediaError|MediaKeyMessageEvent
|MediaKeySession|MediaKeyStatusMap|MediaKeySystemAccess|MediaKeySystemConfiguration|MediaKeys|MediaRecorder|MediaStream
|MediaStreamAudioDestinationNode|MediaStreamAudioSourceNode|MessageChannel|MessageEvent|MessagePort|MouseEvent
|MutationObserver|MutationRecord|NamedNodeMap|Navigator|NavigatorConcurrentHardware|NavigatorGeolocation|NavigatorID
|NavigatorLanguage|NavigatorOnLine|Node|NodeFilter|NodeIterator|NodeList|NonDocumentTypeChildNode|Notification
|OfflineAudioCompletionEvent|OfflineAudioContext|OscillatorNode|PageTransitionEvent|PannerNode|ParentNode|PasswordCredential
|Path2D|PaymentAddress|PaymentRequest|PaymentResponse|Performance|PerformanceEntry|PerformanceFrameTiming|PerformanceMark
|PerformanceMeasure|PerformanceNavigation|PerformanceNavigationTiming|PerformanceObserver|PerformanceObserverEntryList
|PerformanceResourceTiming|PerformanceTiming|PeriodicSyncEvent|PeriodicWave|Plugin|Point|PointerEvent|PopStateEvent
|PortCollection|Position|PositionError|PositionOptions|PresentationConnectionClosedEvent|PresentationConnectionList
|PresentationReceiver|ProcessingInstruction|ProgressEvent|PromiseRejectionEvent|PushEvent|PushRegistrationManager
|RTCCertificate|RTCConfiguration|RTCPeerConnection|RTCSessionDescriptionCallback|RTCStatsReport|RadioNodeList|RandomSource
|Range|ReadableByteStream|RenderingContext|SVGAElement|SVGAngle|SVGAnimateColorElement|SVGAnimateElement|SVGAnimateMotionElement
|SVGAnimateTransformElement|SVGAnimatedAngle|SVGAnimatedBoolean|SVGAnimatedEnumeration|SVGAnimatedInteger|SVGAnimatedLength
|SVGAnimatedLengthList|SVGAnimatedNumber|SVGAnimatedNumberList|SVGAnimatedPoints|SVGAnimatedPreserveAspectRatio
|SVGAnimatedRect|SVGAnimatedString|SVGAnimatedTransformList|SVGAnimationElement|SVGCircleElement|SVGClipPathElement
|SVGCursorElement|SVGDefsElement|SVGDescElement|SVGElement|SVGEllipseElement|SVGEvent|SVGFilterElement|SVGFontElement
|SVGFontFaceElement|SVGFontFaceFormatElement|SVGFontFaceNameElement|SVGFontFaceSrcElement|SVGFontFaceUriElement
|SVGForeignObjectElement|SVGGElement|SVGGlyphElement|SVGGradientElement|SVGHKernElement|SVGImageElement|SVGLength
|SVGLengthList|SVGLineElement|SVGLinearGradientElement|SVGMPathElement|SVGMaskElement|SVGMatrix|SVGMissingGlyphElement
|SVGNumber|SVGNumberList|SVGPathElement|SVGPatternElement|SVGPoint|SVGPolygonElement|SVGPolylineElement|SVGPreserveAspectRatio
|SVGRadialGradientElement|SVGRect|SVGRectElement|SVGSVGElement|SVGScriptElement|SVGSetElement|SVGStopElement|SVGStringList
|SVGStylable|SVGStyleElement|SVGSwitchElement|SVGSymbolElement|SVGTRefElement|SVGTSpanElement|SVGTests|SVGTextElement
|SVGTextPositioningElement|SVGTitleElement|SVGTransform|SVGTransformList|SVGTransformable|SVGUseElement|SVGVKernElement
|SVGViewElement|ServiceWorker|ServiceWorkerContainer|ServiceWorkerGlobalScope|ServiceWorkerRegistration|ServiceWorkerState
|ShadowRoot|SharedWorker|SharedWorkerGlobalScope|SourceBufferList|StereoPannerNode|Storage|StorageEvent|StyleSheet
|StyleSheetList|SubtleCrypto|SyncEvent|Text|TextMetrics|TimeEvent|TimeRanges|Touch|TouchEvent|TouchList|Transferable
|TreeWalker|UIEvent|USVString|VRDisplayCapabilities|ValidityState|WaveShaperNode|WebGL|WebGLActiveInfo|WebGLBuffer
|WebGLContextEvent|WebGLFramebuffer|WebGLProgram|WebGLRenderbuffer|WebGLRenderingContext|WebGLShader|WebGLShaderPrecisionFormat
|WebGLTexture|WebGLTimerQueryEXT|WebGLTransformFeedback|WebGLUniformLocation|WebGLVertexArrayObject|WebGLVertexArrayObjectOES
|WebSocket|WebSockets|WebVTT|WheelEvent|Window|WindowBase64|WindowEventHandlers|WindowTimers|Worker|WorkerGlobalScope
|WorkerLocation|WorkerNavigator|XMLHttpRequest|XMLHttpRequestEventTarget|XMLSerializer|XPathExpression|XPathResult
|XSLTProcessor))\b(?!\$)
captures:
'1': { name: support.variable.dom.ts }
'2': { name: support.class.dom.ts }
- match: |-
(?x) {{propertyAccess}} \s* (?:
(ATTRIBUTE_NODE|CDATA_SECTION_NODE|COMMENT_NODE|DOCUMENT_FRAGMENT_NODE|DOCUMENT_NODE|DOCUMENT_TYPE_NODE
|DOMSTRING_SIZE_ERR|ELEMENT_NODE|ENTITY_NODE|ENTITY_REFERENCE_NODE|HIERARCHY_REQUEST_ERR|INDEX_SIZE_ERR
|INUSE_ATTRIBUTE_ERR|INVALID_CHARACTER_ERR|NO_DATA_ALLOWED_ERR|NO_MODIFICATION_ALLOWED_ERR|NOT_FOUND_ERR
|NOT_SUPPORTED_ERR|NOTATION_NODE|PROCESSING_INSTRUCTION_NODE|TEXT_NODE|WRONG_DOCUMENT_ERR)
|
(_content|[xyz]|abbr|above|accept|acceptCharset|accessKey|action|align|[av]Link(?:color)?|all|alt|anchors|appCodeName
|appCore|applets|appMinorVersion|appName|appVersion|archive|areas|arguments|attributes|availHeight|availLeft|availTop
|availWidth|axis|background|backgroundColor|backgroundImage|below|bgColor|body|border|borderBottomWidth|borderColor
|borderLeftWidth|borderRightWidth|borderStyle|borderTopWidth|borderWidth|bottom|bufferDepth|callee|caller|caption
|cellPadding|cells|cellSpacing|ch|characterSet|charset|checked|childNodes|chOff|cite|classes|className|clear
|clientInformation|clip|clipBoardData|closed|code|codeBase|codeType|color|colorDepth|cols|colSpan|compact|complete
|components|content|controllers|cookie|cookieEnabled|cords|cpuClass|crypto|current|data|dateTime|declare|defaultCharset
|defaultChecked|defaultSelected|defaultStatus|defaultValue|defaultView|defer|description|dialogArguments|dialogHeight
|dialogLeft|dialogTop|dialogWidth|dir|directories|disabled|display|docmain|doctype|documentElement|elements|embeds
|enabledPlugin|encoding|enctype|entities|event|expando|external|face|fgColor|filename|firstChild|fontFamily|fontSize
|fontWeight|form|formName|forms|frame|frameBorder|frameElement|frames|hasFocus|hash|headers|height|history|host
|hostname|href|hreflang|hspace|htmlFor|httpEquiv|id|ids|ignoreCase|images|implementation|index|innerHeight|innerWidth
|input|isMap|label|lang|language|lastChild|lastIndex|lastMatch|lastModified|lastParen|layer[sXY]|left|leftContext
|lineHeight|link|linkColor|links|listStyleType|localName|location|locationbar|longDesc|lowsrc|lowSrc|marginBottom
|marginHeight|marginLeft|marginRight|marginTop|marginWidth|maxLength|media|menubar|method|mimeTypes|multiline|multiple
|name|nameProp|namespaces|namespaceURI|next|nextSibling|nodeName|nodeType|nodeValue|noHref|noResize|noShade|notationName
|notations|noWrap|object|offscreenBuffering|onLine|onreadystatechange|opener|opsProfile|options|oscpu|outerHeight
|outerWidth|ownerDocument|paddingBottom|paddingLeft|paddingRight|paddingTop|page[XY]|page[XY]Offset|parent|parentLayer
|parentNode|parentWindow|pathname|personalbar|pixelDepth|pkcs11|platform|plugins|port|prefix|previous|previousDibling
|product|productSub|profile|profileend|prompt|prompter|protocol|publicId|readOnly|readyState|referrer|rel|responseText
|responseXML|rev|right|rightContext|rowIndex|rows|rowSpan|rules|scheme|scope|screen[XY]|screenLeft|screenTop|scripts
|scrollbars|scrolling|sectionRowIndex|security|securityPolicy|selected|selectedIndex|selection|self|shape|siblingAbove
|siblingBelow|size|source|specified|standby|start|status|statusbar|statusText|style|styleSheets|suffixes|summary
|systemId|systemLanguage|tagName|tags|target|tBodies|text|textAlign|textDecoration|textIndent|textTransform|tFoot|tHead
|title|toolbar|top|type|undefined|uniqueID|updateInterval|URL|URLUnencoded|useMap|userAgent|userLanguage|userProfile
|vAlign|value|valueType|vendor|vendorSub|version|visibility|vspace|whiteSpace|width|X[MS]LDocument|zIndex))\b(?!\$|\s*{{typeParameters}}?\()
captures:
'1': { name: punctuation.accessor.ts }
'2': { name: punctuation.accessor.optional.ts }
'3': { name: support.constant.dom.ts }
'4': { name: support.variable.property.dom.ts }
# Node
- name: support.class.node.ts
match: |-
(?x){{startOfIdentifier}}(Buffer|EventEmitter|Server|Pipe|Socket|REPLServer|ReadStream|WriteStream|Stream
|Inflate|Deflate|InflateRaw|DeflateRaw|GZip|GUnzip|Unzip|Zip)\b(?!\$)
- match: |-
(?x){{startOfIdentifier}}(process)(?:{{propertyAccess}}(?:
(arch|argv|config|connected|env|execArgv|execPath|exitCode|mainModule|pid|platform|release|stderr|stdin|stdout|title|version|versions)
|
(abort|chdir|cwd|disconnect|exit|[sg]ete?[gu]id|send|[sg]etgroups|initgroups|kill|memoryUsage|nextTick|umask|uptime|hrtime)
))?\b(?!\$)
captures:
'1': { name: support.variable.object.process.ts }
'2': { name: punctuation.accessor.ts }
'3': { name: punctuation.accessor.optional.ts }
'4': { name: support.variable.property.process.ts }
'5': { name: support.function.process.ts }
- match: '{{startOfIdentifier}}(?:(exports)|(module)(?:{{propertyAccess}}(exports|id|filename|loaded|parent|children))?)\b(?!\$)'
captures:
'1': { name: support.type.object.module.ts }
'2': { name: support.type.object.module.ts }
'3': { name: punctuation.accessor.ts }
'4': { name: punctuation.accessor.optional.ts }
'5': { name: support.type.object.module.ts }
- name: support.variable.object.node.ts
match: '{{startOfIdentifier}}(global|GLOBAL|root|__dirname|__filename)\b(?!\$)'
# method calls
- match: |-
(?x) {{propertyAccess}} \s*
(?:
(on(?:Rowsinserted|Rowsdelete|Rowenter|Rowexit|Resize|Resizestart|Resizeend|Reset|
Readystatechange|Mouseout|Mouseover|Mousedown|Mouseup|Mousemove|
Before(?:cut|deactivate|unload|update|paste|print|editfocus|activate)|
Blur|Scrolltop|Submit|Select|Selectstart|Selectionchange|Hover|Help|
Change|Contextmenu|Controlselect|Cut|Cellchange|Clock|Close|Deactivate|
Datasetchanged|Datasetcomplete|Dataavailable|Drop|Drag|Dragstart|Dragover|
Dragdrop|Dragenter|Dragend|Dragleave|Dblclick|Unload|Paste|Propertychange|Error|
Errorupdate|Keydown|Keyup|Keypress|Focus|Load|Activate|Afterupdate|Afterprint|Abort)
) |
(shift|showModelessDialog|showModalDialog|showHelp|scroll|scrollX|scrollByPages|
scrollByLines|scrollY|scrollTo|stop|strike|sizeToContent|sidebar|signText|sort|
sup|sub|substr|substring|splice|split|send|set(?:Milliseconds|Seconds|Minutes|Hours|
Month|Year|FullYear|Date|UTC(?:Milliseconds|Seconds|Minutes|Hours|Month|FullYear|Date)|
Time|Hotkeys|Cursor|ZOptions|Active|Resizable|RequestHeader)|search|slice|
savePreferences|small|home|handleEvent|navigate|char|charCodeAt|charAt|concat|
contextual|confirm|compile|clear|captureEvents|call|createStyleSheet|createPopup|
createEventObject|to(?:GMTString|UTCString|String|Source|UpperCase|LowerCase|LocaleString)|
test|taint|taintEnabled|indexOf|italics|disableExternalCapture|dump|detachEvent|unshift|
untaint|unwatch|updateCommands|join|javaEnabled|pop|push|plugins.refresh|paddings|parse|
print|prompt|preference|enableExternalCapture|exec|execScript|valueOf|UTC|find|file|
fileModifiedDate|fileSize|fileCreatedDate|fileUpdatedDate|fixed|fontsize|fontcolor|
forward|fromCharCode|watch|link|load|lastIndexOf|anchor|attachEvent|atob|apply|alert|
abort|routeEvents|resize|resizeBy|resizeTo|recalc|returnValue|replace|reverse|reload|
releaseCapture|releaseEvents|go|get(?:Milliseconds|Seconds|Minutes|Hours|Month|Day|Year|FullYear|
Time|Date|TimezoneOffset|UTC(?:Milliseconds|Seconds|Minutes|Hours|Day|Month|FullYear|Date)|
Attention|Selection|ResponseHeader|AllResponseHeaders)|moveBy|moveBelow|moveTo|
moveToAbsolute|moveAbove|mergeAttributes|match|margins|btoa|big|bold|borderWidths|blink|back
) |
(acceptNode|add|addEventListener|addTextTrack|adoptNode|after|animate|append|
appendChild|appendData|before|blur|canPlayType|captureStream|
caretPositionFromPoint|caretRangeFromPoint|checkValidity|clear|click|
cloneContents|cloneNode|cloneRange|close|closest|collapse|
compareBoundaryPoints|compareDocumentPosition|comparePoint|contains|
convertPointFromNode|convertQuadFromNode|convertRectFromNode|createAttribute|
createAttributeNS|createCaption|createCDATASection|createComment|
createContextualFragment|createDocument|createDocumentFragment|
createDocumentType|createElement|createElementNS|createEntityReference|
createEvent|createExpression|createHTMLDocument|createNodeIterator|
createNSResolver|createProcessingInstruction|createRange|createShadowRoot|
createTBody|createTextNode|createTFoot|createTHead|createTreeWalker|delete|
deleteCaption|deleteCell|deleteContents|deleteData|deleteRow|deleteTFoot|
deleteTHead|detach|disconnect|dispatchEvent|elementFromPoint|elementsFromPoint|
enableStyleSheetsForSet|entries|evaluate|execCommand|exitFullscreen|
exitPointerLock|expand|extractContents|fastSeek|firstChild|focus|forEach|get|
getAll|getAnimations|getAttribute|getAttributeNames|getAttributeNode|
getAttributeNodeNS|getAttributeNS|getBoundingClientRect|getBoxQuads|
getClientRects|getContext|getDestinationInsertionPoints|getElementById|
getElementsByClassName|getElementsByName|getElementsByTagName|
getElementsByTagNameNS|getItem|getNamedItem|getSelection|getStartDate|
getVideoPlaybackQuality|has|hasAttribute|hasAttributeNS|hasAttributes|
hasChildNodes|hasFeature|hasFocus|importNode|initEvent|insertAdjacentElement|
insertAdjacentHTML|insertAdjacentText|insertBefore|insertCell|insertData|
insertNode|insertRow|intersectsNode|isDefaultNamespace|isEqualNode|
isPointInRange|isSameNode|item|key|keys|lastChild|load|lookupNamespaceURI|
lookupPrefix|matches|move|moveAttribute|moveAttributeNode|moveChild|
moveNamedItem|namedItem|nextNode|nextSibling|normalize|observe|open|
parentNode|pause|play|postMessage|prepend|preventDefault|previousNode|
previousSibling|probablySupportsContext|queryCommandEnabled|
queryCommandIndeterm|queryCommandState|queryCommandSupported|queryCommandValue|
querySelector|querySelectorAll|registerContentHandler|registerElement|
registerProtocolHandler|releaseCapture|releaseEvents|remove|removeAttribute|
removeAttributeNode|removeAttributeNS|removeChild|removeEventListener|
removeItem|replace|replaceChild|replaceData|replaceWith|reportValidity|
requestFullscreen|requestPointerLock|reset|scroll|scrollBy|scrollIntoView|
scrollTo|seekToNextFrame|select|selectNode|selectNodeContents|set|setAttribute|
setAttributeNode|setAttributeNodeNS|setAttributeNS|setCapture|
setCustomValidity|setEnd|setEndAfter|setEndBefore|setItem|setNamedItem|
setRangeText|setSelectionRange|setSinkId|setStart|setStartAfter|setStartBefore|
slice|splitText|stepDown|stepUp|stopImmediatePropagation|stopPropagation|
submit|substringData|supports|surroundContents|takeRecords|terminate|toBlob|
toDataURL|toggle|toString|values|write|writeln
) |
(all|catch|finally|race|reject|resolve|then
)
)(?=\s*\()
captures:
'1': { name: punctuation.accessor.ts }
'2': { name: punctuation.accessor.optional.ts }
'3': { name: support.function.event-handler.ts }
'4': { name: support.function.ts }
'5': { name: support.function.dom.ts }
'6': { name: support.function.promise.ts }
identifiers:
patterns:
- include: '#object-identifiers'
# function and method assignment
- match: |-
(?x)(?:{{propertyAccess}}\s*)?({{identifier}})(?=\s*={{functionOrArrowLookup}})
captures:
'1': { name: punctuation.accessor.ts }
'2': { name: punctuation.accessor.optional.ts }
'3': { name: entity.name.function.ts }
# const properties
- match: '{{propertyAccess}}\s*({{constantPropertyIdentifier}})(?![_$[:alnum:]])'
captures:
'1': { name: punctuation.accessor.ts }
'2': { name: punctuation.accessor.optional.ts }
'3': { name: variable.other.constant.property.ts }
# properties
- match: '{{propertyAccess}}\s*({{propertyIdentifier}})'
captures:
'1': { name: punctuation.accessor.ts }
'2': { name: punctuation.accessor.optional.ts }
'3': { name: variable.other.property.ts }
# const
- name: variable.other.constant.ts
match: '{{constantVar}}'
# vars
- name: variable.other.readwrite.ts
match: '{{identifier}}'
object-identifiers:
patterns:
# class
- name: support.class.ts
match: ({{identifier}})(?=\s*{{propertyAccessPreIdentifier}}prototype\b(?!\$))
# object properties
- match: |-
(?x){{propertyAccess}}\s*(?:
({{constantPropertyIdentifier}}) |
({{propertyIdentifier}})
)(?=\s*{{propertyAccessPreIdentifier}}{{propertyIdentifier}})
captures:
'1': { name: punctuation.accessor.ts }
'2': { name: punctuation.accessor.optional.ts }
'3': { name: variable.other.constant.object.property.ts }
'4': { name: variable.other.object.property.ts }
# objects
- match: |-
(?x)(?:
({{constantIdentifier}}) |
({{identifier}})
)(?=\s*{{propertyAccessPreIdentifier}}{{propertyIdentifier}})
captures:
'1': { name: variable.other.constant.object.ts }
'2': { name: variable.other.object.ts }
#type annotation
type-annotation:
patterns:
# if type starts on same line use end of line as end
- name: meta.type.annotation.ts
begin: (:)(?=\s*\S)
beginCaptures:
'1': { name: keyword.operator.type.annotation.ts }
end: (?<![:|&])(?!\s*[|&]\s+)((?=^|[,);\}\]]|//)|(?==[^>])|((?<=[\}>\]\)]|[_$[:alpha:]])\s*(?=\{)))
patterns:
- include: '#type'
# if type starts on next line use modified line endings as end of type annotation eg. complete empty line
- name: meta.type.annotation.ts
begin: (:)
beginCaptures:
'1': { name: keyword.operator.type.annotation.ts }
end: (?<![:|&])((?=[,);\}\]]|\/\/)|(?==[^>])|(?=^\s*$)|((?<=[\}>\]\)]|[_$[:alpha:]])\s*(?=\{)))
patterns:
- include: '#type'
parameter-type-annotation:
patterns:
- name: meta.type.annotation.ts
begin: (:)
beginCaptures:
'1': { name: keyword.operator.type.annotation.ts }
end: (?=[,)])|(?==[^>])
patterns:
- include: '#type'
#return type
return-type:
patterns:
# if type starts on same line use end of line as end
- name: meta.return.type.ts
begin: (?<=\))\s*(:)(?=\s*\S)
beginCaptures:
'1': { name: keyword.operator.type.annotation.ts }
end: (?<![:|&])(?=$|^|[{};,]|//)
patterns:
- include: '#return-type-core'
# if type starts on next line use modified line endings as end of type annotation eg. complete empty line
- name: meta.return.type.ts
begin: (?<=\))\s*(:)
beginCaptures:
'1': { name: keyword.operator.type.annotation.ts }
end: (?<![:|&])((?=[{};,]|//|^\s*$)|((?<=\S)(?=\s*$)))
patterns:
- include: '#return-type-core'
return-type-core:
patterns:
- include: '#comment'
# Handle returning of object type specifically here so as to not confuse it with the start of function block
- begin: (?<=[:|&])(?=\s*\{)
end: (?<=\})
patterns:
- include: '#type-object'
- include: '#type-predicate-operator'
- include: '#type'
#arrow return type
arrow-return-type:
name: meta.return.type.arrow.ts
begin: '(?<=\))\s*(:)'
beginCaptures:
'1': { name: keyword.operator.type.annotation.ts }
end: '{{arrowFunctionEnd}}'
patterns:
- include: '#arrow-return-type-body'
#This is the check if the exoression '): something =>'' can be matched as return type of arrow
possibly-arrow-return-type:
begin: (?<=\)|^)\s*(:)(?={{possiblyType}}\s*=>)
beginCaptures:
'1': { name: meta.arrow.ts meta.return.type.arrow.ts keyword.operator.type.annotation.ts }
end: '{{arrowFunctionEnd}}'
contentName: meta.arrow.ts meta.return.type.arrow.ts
patterns:
- include: '#arrow-return-type-body'
arrow-return-type-body:
patterns:
# TODO: handle the fn and constructor type specifically.
# Handle returning of object type specifically here so as to not confuse it with the start of function block
- begin: (?<=[:])(?=\s*\{)
end: (?<=\})
patterns:
- include: '#type-object'
- include: '#type-predicate-operator'
- include: '#type'
#type parameters
type-parameters:
name: meta.type.parameters.ts
begin: '(<)'
beginCaptures:
'1': { name: punctuation.definition.typeparameters.begin.ts }
end: '(>)'
endCaptures:
'1': { name: punctuation.definition.typeparameters.end.ts }
patterns:
- include: '#comment'
- name: storage.modifier.ts
match: '{{startOfIdentifier}}(extends|in|out|const){{endOfIdentifier}}'
- include: '#type'
- include: '#punctuation-comma'
- name: keyword.operator.assignment.ts
match: (=)(?!>)
#type arguments
type-arguments:
name: meta.type.parameters.ts
begin: \<
beginCaptures:
'0': { name: punctuation.definition.typeparameters.begin.ts }
end: \>
endCaptures:
'0': { name: punctuation.definition.typeparameters.end.ts }
patterns:
- include: '#type-arguments-body'
type-arguments-body:
patterns:
- match: '{{startOfIdentifier}}(_){{endOfIdentifier}}'
captures:
'0': { name: keyword.operator.type.ts }
- include: '#type'
- include: '#punctuation-comma'
#different types
type:
patterns:
- include: '#comment'
- include: '#type-string'
- include: '#numeric-literal'
- include: '#type-primitive'
- include: '#type-builtin-literals'
- include: '#type-parameters'
- include: '#type-tuple'
- include: '#type-object'
- include: '#type-operators'
- include: '#type-conditional'
- include: '#type-fn-type-parameters'
- include: '#type-paren-or-function-parameters'
- include: '#type-function-return-type'
- match: '{{startOfIdentifier}}(readonly){{endOfIdentifier}}\s*'
captures:
'1': { name: storage.modifier.ts }
- include: '#type-name'
type-primitive:
name: support.type.primitive.ts
match: '{{startOfIdentifier}}(string|number|bigint|boolean|symbol|any|void|never|unknown){{endOfIdentifier}}'
type-builtin-literals:
name: support.type.builtin.ts
match: '{{startOfIdentifier}}(this|true|false|undefined|null|object){{endOfIdentifier}}'
type-tuple:
name: meta.type.tuple.ts
begin: \[
beginCaptures:
'0': { name: meta.brace.square.ts }
end: \]
endCaptures:
'0': { name: meta.brace.square.ts }
patterns:
- name: keyword.operator.rest.ts
match: \.\.\.
- match: '{{startOfIdentifier}}({{identifier}})\s*(\?)?\s*(:)'
captures:
'1': { name: entity.name.label.ts }
'2': { name: keyword.operator.optional.ts }
'3': { name: punctuation.separator.label.ts }
- include: '#type'
- include: '#punctuation-comma'
type-object:
name: meta.object.type.ts
begin: \{
beginCaptures:
'0': { name: punctuation.definition.block.ts }
end: \}
endCaptures:
'0': { name: punctuation.definition.block.ts }
patterns:
- include: '#comment'
- include: '#method-declaration'
- include: '#indexer-declaration'
- include: '#indexer-mapped-type-declaration'
- include: '#field-declaration'
- include: '#type-annotation'
- begin: \.\.\.
beginCaptures:
'0': { name: keyword.operator.spread.ts }
end: '(?=\}|;|,|$)|(?<=\})'
patterns:
- include: '#type'
- include: '#punctuation-comma'
- include: '#punctuation-semicolon'
- include: '#type'
#conditional type
type-conditional:
patterns:
- begin: '{{startOfIdentifier}}(extends)\s+'
beginCaptures:
'1': { name: storage.modifier.ts }
end: (?<=:)
patterns:
- begin: \?
beginCaptures:
'0': { name: keyword.operator.ternary.ts }
end: ':'
endCaptures:
'0': { name: keyword.operator.ternary.ts }
patterns:
- include: '#type'
- include: '#type'
# Parenthesis can contain either types and function parameters
# (number | string) or (param: number, param2: string)
# and it can be nested, for example
# (number | (param: number, param2: string) => void)
type-paren-or-function-parameters:
name: meta.type.paren.cover.ts
begin: \(
beginCaptures:
'0': { name: meta.brace.round.ts }
end: \)
endCaptures:
'0': { name: meta.brace.round.ts }
patterns:
#parameter name only if followed by type annotation
- match: |-
(?x)(?:{{startOfIdentifier}}(public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:){{startOfIdentifier}}(?:(this)|({{identifier}}))\s*(\??)(?=\s*{{functionLikeType}})
captures:
'1': { name: storage.modifier.ts }
'2': { name: keyword.operator.rest.ts }
'3': { name: entity.name.function.ts variable.language.this.ts }
'4': { name: entity.name.function.ts }
'5': { name: keyword.operator.optional.ts }
- match: |-
(?x)(?:{{startOfIdentifier}}(public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:){{startOfIdentifier}}(?:(this)|({{identifier}}))\s*(\??)(?=:)
captures:
'1': { name: storage.modifier.ts }
'2': { name: keyword.operator.rest.ts }
'3': { name: variable.parameter.ts variable.language.this.ts }
'4': { name: variable.parameter.ts }
'5': { name: keyword.operator.optional.ts }
- include: '#type-annotation'
- name: punctuation.separator.parameter.ts
match: ','
- include: '#type'
type-fn-type-parameters:
patterns:
# constructor type
- begin: '{{startOfIdentifier}}(?:(abstract)\s+)?(new)\b(?=\s*\<)'
beginCaptures:
'1': { name: meta.type.constructor.ts storage.modifier.ts } # captures keyword (abstract)
'2': { name: meta.type.constructor.ts keyword.control.new.ts } # captures keyword (new)
end: (?<=>)
patterns:
- include: '#comment'
- include: '#type-parameters'
- name: meta.type.constructor.ts
begin: '{{startOfIdentifier}}(?:(abstract)\s+)?(new)\b\s*(?=\()'
beginCaptures:
'1': { name: storage.modifier.ts } # captures keyword (abstract)
'2': { name: keyword.control.new.ts } # captures keyword (new)
end: (?<=\))
patterns:
- include: '#function-parameters'
# () | (... | (param: | (param, | (param? | (param= | (param) =>
- name: meta.type.function.ts
begin: |-
(?x)(
(?=
[(]\s*(
([)]) |
(\.\.\.) |
([_$[:alnum:]]+\s*(
([:,?=])|
([)]\s*=>)
))
)
)
)
end: (?<=\))
patterns:
- include: '#function-parameters'
type-function-return-type:
patterns:
# if type starts on same line use end of line as end
- name: meta.type.function.return.ts
begin: (=>)(?=\s*\S)
beginCaptures:
'1': { name: storage.type.function.arrow.ts }
end: (?<!=>)(?<![|&])(?=[,\]\)\{\}=;>:\?]|//|$)
patterns:
- include: '#type-function-return-type-core'
# if type starts on next line use modified line endings as end of type annotation eg. complete empty line
- name: meta.type.function.return.ts
begin: '=>'
beginCaptures:
'0': { name: storage.type.function.arrow.ts }
end: (?<!=>)(?<![|&])((?=[,\]\)\{\}=;:\?>]|//|^\s*$)|((?<=\S)(?=\s*$)))
patterns:
- include: '#type-function-return-type-core'
type-function-return-type-core:
patterns:
- include: '#comment'
# Handle returning of object type specifically here so as to not confuse it with the start of function block
- begin: (?<==>)(?=\s*\{)
end: (?<=\})
patterns:
- include: '#type-object'
- include: '#type-predicate-operator'
- include: '#type'
#type operators
type-operators:
patterns:
- include: '#typeof-operator'
- include: '#type-infer'
# Handle the object types followed by | or & operator as { can be used as end of Type in many places and this avoids tripping that
- begin: ([&|])(?=\s*\{)
beginCaptures:
'0': { name: keyword.operator.type.ts }
end: (?<=\})
patterns:
- include: '#type-object'
# capture all white spaces followed by the | or & operator so that line break (which is end regex for many type patterns)
# will be consumed and we will continue to be in type space
- begin: '[&|]'
beginCaptures:
'0': { name: keyword.operator.type.ts }
end: (?=\S)
- name: keyword.operator.expression.keyof.ts
match: '{{startOfIdentifier}}keyof{{endOfIdentifier}}'
- name: keyword.operator.ternary.ts
match: (\?|\:)
- name: keyword.operator.expression.import.ts
match: '{{startOfIdentifier}}import(?=\s*\()'
type-infer:
patterns:
- match: '{{startOfIdentifier}}(infer)\s+({{identifier}}){{endOfIdentifier}}(?:\s+(extends){{endOfIdentifier}})?'
name: meta.type.infer.ts
captures:
'1': { name: keyword.operator.expression.infer.ts }
'2': { name: entity.name.type.ts }
'3': { name: keyword.operator.expression.extends.ts }
type-predicate-operator:
patterns:
- match: '{{startOfIdentifier}}(?:(asserts)\s+)?(?!asserts)(?:(this)|({{identifier}}))\s(is){{endOfIdentifier}}'
captures:
'1': { name: keyword.operator.type.asserts.ts }
'2': { name: variable.parameter.ts variable.language.this.ts }
'3': { name: variable.parameter.ts }
'4': { name: keyword.operator.expression.is.ts }
- match: '{{startOfIdentifier}}(asserts)\s+(?!is)(?:(this)|({{identifier}})){{endOfIdentifier}}'
captures:
'1': { name: keyword.operator.type.asserts.ts }
'2': { name: variable.parameter.ts variable.language.this.ts }
'3': { name: variable.parameter.ts }
- name: keyword.operator.type.asserts.ts
match: '{{startOfIdentifier}}asserts{{endOfIdentifier}}'
- name: keyword.operator.expression.is.ts
match: '{{startOfIdentifier}}is{{endOfIdentifier}}'
#name of the type and type name followed by type arguments
type-name:
patterns:
- begin: '({{identifier}})\s*{{propertyAccess}}\s*(<)'
captures:
'1': { name: entity.name.type.module.ts }
'2': { name: punctuation.accessor.ts }
'3': { name: punctuation.accessor.optional.ts }
'4': { name: meta.type.parameters.ts punctuation.definition.typeparameters.begin.ts }
end: '(>)'
endCaptures:
'1': { name: meta.type.parameters.ts punctuation.definition.typeparameters.end.ts }
contentName: meta.type.parameters.ts
patterns:
- include: '#type-arguments-body'
- begin: '({{identifier}})\s*(<)'
beginCaptures:
'1': { name: entity.name.type.ts }
'2': { name: meta.type.parameters.ts punctuation.definition.typeparameters.begin.ts }
end: '(>)'
endCaptures:
'1': { name: meta.type.parameters.ts punctuation.definition.typeparameters.end.ts }
contentName: meta.type.parameters.ts
patterns:
- include: '#type-arguments-body'
- match: ({{identifier}})\s*{{propertyAccess}}
captures:
'1': { name: entity.name.type.module.ts }
'2': { name: punctuation.accessor.ts }
'3': { name: punctuation.accessor.optional.ts }
- name: entity.name.type.ts
match: '{{identifier}}'
#punctuations
punctuation-comma:
name: punctuation.separator.comma.ts
match: ','
punctuation-semicolon:
name: punctuation.terminator.statement.ts
match: ';'
punctuation-accessor:
match: '{{propertyAccess}}'
captures:
'1': { name: punctuation.accessor.ts }
'2': { name: punctuation.accessor.optional.ts }
#strings and template strings
string:
patterns:
- include: '#qstring-single'
- include: '#qstring-double'
- include: '#template'
qstring-double:
name: string.quoted.double.ts
begin: '"'
beginCaptures:
'0': { name: punctuation.definition.string.begin.ts }
end: '(")|((?:[^\\\n])$)'
endCaptures:
'1': { name: punctuation.definition.string.end.ts }
'2': { name: invalid.illegal.newline.ts }
patterns:
- include: '#string-character-escape'
qstring-single:
name: string.quoted.single.ts
begin: "'"
beginCaptures:
'0': { name: punctuation.definition.string.begin.ts }
end: (\')|((?:[^\\\n])$)
endCaptures:
'1': { name: punctuation.definition.string.end.ts }
'2': { name: invalid.illegal.newline.ts }
patterns:
- include: '#string-character-escape'
string-character-escape:
name: constant.character.escape.ts
match: \\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|u\{[0-9A-Fa-f]+\}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)
template:
patterns:
- include: '#template-call'
- contentName: string.template.ts
begin: '({{identifier}})?(`)'
beginCaptures:
'1': { name: entity.name.function.tagged-template.ts }
'2': { name: string.template.ts punctuation.definition.string.template.begin.ts }
end: '`'
endCaptures:
'0': { name: string.template.ts punctuation.definition.string.template.end.ts}
patterns:
- include: '#template-substitution-element'
- include: '#string-character-escape'
template-call:
patterns:
- begin: (?=(({{identifier}}\s*{{propertyAccessPreIdentifier}})*|({{propertyAccessPreIdentifier}})?)({{identifier}})({{typeArguments}}\s*)?`)
end: (?=`)
patterns:
- begin: (?=(({{identifier}}\s*{{propertyAccessPreIdentifier}})*|({{propertyAccessPreIdentifier}})?)({{identifier}}))
end: (?=({{typeArguments}}\s*)?`)
patterns:
- include: '#support-function-call-identifiers'
- name: entity.name.function.tagged-template.ts
match: ({{identifier}})
- include: '#type-arguments'
- begin: ({{identifier}})?\s*(?=({{typeArguments}}\s*)`)
beginCaptures:
'1': { name: entity.name.function.tagged-template.ts }
end: (?=`)
patterns:
- include: '#type-arguments'
template-substitution-element:
name: meta.template.expression.ts
begin: \$\{
beginCaptures:
'0': { name: punctuation.definition.template-expression.begin.ts }
end: \}
endCaptures:
'0': { name: punctuation.definition.template-expression.end.ts }
patterns:
- include: '#expression'
contentName: meta.embedded.line.ts
type-string:
patterns:
- include: '#qstring-single'
- include: '#qstring-double'
- include: '#template-type'
template-type:
patterns:
- include: '#template-call'
- contentName: string.template.ts
begin: '({{identifier}})?(`)'
beginCaptures:
'1': { name: entity.name.function.tagged-template.ts }
'2': { name: string.template.ts punctuation.definition.string.template.begin.ts }
end: '`'
endCaptures:
'0': { name: string.template.ts punctuation.definition.string.template.end.ts}
patterns:
- include: '#template-type-substitution-element'
- include: '#string-character-escape'
template-type-substitution-element:
name: meta.template.expression.ts
begin: \$\{
beginCaptures:
'0': { name: punctuation.definition.template-expression.begin.ts }
end: \}
endCaptures:
'0': { name: punctuation.definition.template-expression.end.ts }
patterns:
- include: '#type'
contentName: meta.embedded.line.ts
#regular expression
# regexp syntax is taken from https://github.com/atom/language-javascript/
regex:
patterns:
- name: string.regexp.ts
begin: (?<!\+\+|--|})(?<=[=(:,\[?+!]|{{lookBehindReturn}}|{{lookBehindCase}}|=>|&&|\|\||\*\/)\s*(\/)(?![\/*])(?=(?:[^\/\\\[\()]|\\.|\[([^\]\\]|\\.)+\]|\(([^\)\\]|\\.)+\))+\/{{regexpTail}})
beginCaptures:
'1': { name: punctuation.definition.string.begin.ts }
end: (/)([dgimsuvy]*)
endCaptures:
'1': { name: punctuation.definition.string.end.ts }
'2': { name: keyword.other.ts}
patterns:
- include: '#regexp'
# Check if complete regexp syntax
- name: string.regexp.ts
begin: ((?<![_$[:alnum:])\]]|\+\+|--|}|\*\/)|((?<={{lookBehindReturn}}|{{lookBehindCase}}))\s*){{completeRegexp}}
beginCaptures:
'0': { name: punctuation.definition.string.begin.ts }
end: (/)([dgimsuvy]*)
endCaptures:
'1': { name: punctuation.definition.string.end.ts }
'2': { name: keyword.other.ts }
patterns:
- include: '#regexp'
regexp:
patterns:
- name: keyword.control.anchor.regexp
match: \\[bB]|\^|\$
- match: \\[1-9]\d*|\\k<([a-zA-Z_$][\w$]*)>
captures:
'0': { name: keyword.other.back-reference.regexp }
'1': { name: variable.other.regexp }
- name: keyword.operator.quantifier.regexp
match: '[?+*]|\{(\d+,\d+|\d+,|,\d+|\d+)\}\??'
- name: keyword.operator.or.regexp
match: \|
- name: meta.group.assertion.regexp
begin: (\()((\?=)|(\?!)|(\?<=)|(\?<!))
beginCaptures:
'1': { name: punctuation.definition.group.regexp }
'2': { name: punctuation.definition.group.assertion.regexp }
'3': { name: meta.assertion.look-ahead.regexp }
'4': { name: meta.assertion.negative-look-ahead.regexp }
'5': { name: meta.assertion.look-behind.regexp }
'6': { name: meta.assertion.negative-look-behind.regexp }
end: (\))
endCaptures:
'1': {name: punctuation.definition.group.regexp }
patterns:
- include: '#regexp'
- name: meta.group.regexp
begin: \((?:(\?:)|(?:\?<([a-zA-Z_$][\w$]*)>))?
beginCaptures:
'0': { name: punctuation.definition.group.regexp }
'1': { name: punctuation.definition.group.no-capture.regexp }
'2': { name: variable.other.regexp }
end: \)
endCaptures:
'0': { name: punctuation.definition.group.regexp }
patterns:
- include: '#regexp'
- name: constant.other.character-class.set.regexp
begin: (\[)(\^)?
beginCaptures:
'1': { name: punctuation.definition.character-class.regexp }
'2': { name: keyword.operator.negation.regexp }
end: (\])
endCaptures:
'1': {name: punctuation.definition.character-class.regexp }
patterns:
- name: constant.other.character-class.range.regexp
match: (?:.|(\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\c[A-Z])|(\\.))\-(?:[^\]\\]|(\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\c[A-Z])|(\\.))
captures:
'1': { name: constant.character.numeric.regexp }
'2': { name: constant.character.control.regexp }
'3': { name: constant.character.escape.backslash.regexp }
'4': { name: constant.character.numeric.regexp }
'5': { name: constant.character.control.regexp }
'6': { name: constant.character.escape.backslash.regexp }
- include: '#regex-character-class'
- include: '#regex-character-class'
regex-character-class:
patterns:
- name: constant.other.character-class.regexp
match: \\[wWsSdDtrnvf]|\.
- name: constant.character.numeric.regexp
match: \\([0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4})
- name: constant.character.control.regexp
match: \\c[A-Z]
- name: constant.character.escape.backslash.regexp
match: \\.
#comments and directives
comment:
patterns:
- name: comment.block.documentation.ts
begin: /\*\*(?!/)
beginCaptures:
'0': { name: punctuation.definition.comment.ts }
end: \*/
endCaptures:
'0': { name: punctuation.definition.comment.ts }
patterns:
- include: '#docblock'
- name: comment.block.ts
begin: (/\*)(?:\s*((@)internal)(?=\s|(\*/)))?
beginCaptures:
'1': { name: punctuation.definition.comment.ts }
'2': { name: storage.type.internaldeclaration.ts }
'3': { name: punctuation.decorator.internaldeclaration.ts }
end: \*/
endCaptures:
'0': { name: punctuation.definition.comment.ts }
- begin: (^[ \t]+)?((//)(?:\s*((@)internal)(?=\s|$))?)
beginCaptures:
'1': { name: punctuation.whitespace.comment.leading.ts }
'2': { name: comment.line.double-slash.ts }
'3': { name: punctuation.definition.comment.ts }
'4': { name: storage.type.internaldeclaration.ts }
'5': { name: punctuation.decorator.internaldeclaration.ts }
end: (?=$)
contentName: comment.line.double-slash.ts
single-line-comment-consuming-line-ending:
begin: (^[ \t]+)?((//)(?:\s*((@)internal)(?=\s|$))?)
beginCaptures:
'1': { name: punctuation.whitespace.comment.leading.ts }
'2': { name: comment.line.double-slash.ts }
'3': { name: punctuation.definition.comment.ts }
'4': { name: storage.type.internaldeclaration.ts }
'5': { name: punctuation.decorator.internaldeclaration.ts }
end: (?=^)
contentName: comment.line.double-slash.ts
directives:
name: comment.line.triple-slash.directive.ts
begin: ^(///)\s*(?=<(reference|amd-dependency|amd-module)(\s+(path|types|no-default-lib|lib|name|resolution-mode)\s*=\s*({{quotedStrings}}))+\s*/>\s*$)
beginCaptures:
'1': { name: punctuation.definition.comment.ts }
end: (?=$)
patterns:
- name: meta.tag.ts
begin: (<)(reference|amd-dependency|amd-module)
beginCaptures:
'1': { name: punctuation.definition.tag.directive.ts }
'2': { name: entity.name.tag.directive.ts }
end: />
endCaptures:
'0': { name: punctuation.definition.tag.directive.ts }
patterns:
- name: entity.other.attribute-name.directive.ts
match: 'path|types|no-default-lib|lib|name|resolution-mode'
- name: keyword.operator.assignment.ts
match: '='
- include: '#string'
#jsdoc syntax taken from https://github.com/atom/language-javascript/
#no longer maintained there, however: https://github.com/atom/language-javascript/pull/645#issuecomment-496795093
docblock:
patterns:
# @access private|protected|public
- match: |-
(?x)
((@)(?:access|api))
\s+
(private|protected|public)
\b
captures:
'1': { name: storage.type.class.jsdoc }
'2': { name: punctuation.definition.block.tag.jsdoc }
'3': { name: constant.language.access-type.jsdoc }
# @author name [<email>]
- match: |-
(?x)
((@)author)
\s+
(
[^@\s<>*/]
(?:[^@<>*/]|\*[^/])*
)
(?:
\s*
(<)
([^>\s]+)
(>)
)?
captures:
'1': { name: storage.type.class.jsdoc }
'2': { name: punctuation.definition.block.tag.jsdoc }
'3': { name: entity.name.type.instance.jsdoc }
'4': { name: punctuation.definition.bracket.angle.begin.jsdoc }
'5': { name: constant.other.email.link.underline.jsdoc }
'6': { name: punctuation.definition.bracket.angle.end.jsdoc }
# @borrows <that namepath> as <this namepath>
- match: |-
(?x)
((@)borrows) \s+
((?:[^@\s*/]|\*[^/])+) # <that namepath>
\s+ (as) \s+ # as
((?:[^@\s*/]|\*[^/])+) # <this namepath>
captures:
'1': { name: storage.type.class.jsdoc }
'2': { name: punctuation.definition.block.tag.jsdoc }
'3': { name: entity.name.type.instance.jsdoc }
'4': { name: keyword.operator.control.jsdoc }
'5': { name: entity.name.type.instance.jsdoc }
# @example text();
- name: meta.example.jsdoc
begin: ((@)example)\s+
end: (?=@|\*/)
beginCaptures:
'1': { name: storage.type.class.jsdoc }
'2': { name: punctuation.definition.block.tag.jsdoc }
patterns:
# Match to prevent leading asterisk being highlighted as JS
- match: ^\s\*\s+
# Leading <caption>…</caption> before example
- contentName: constant.other.description.jsdoc
begin: \G(<)caption(>)
beginCaptures:
'0': { name: entity.name.tag.inline.jsdoc }
'1': { name: punctuation.definition.bracket.angle.begin.jsdoc }
'2': { name: punctuation.definition.bracket.angle.end.jsdoc }
end: (</)caption(>)|(?=\*/)
endCaptures:
'0': { name: entity.name.tag.inline.jsdoc }
'1': { name: punctuation.definition.bracket.angle.begin.jsdoc }
'2': { name: punctuation.definition.bracket.angle.end.jsdoc }
# Highlighted JavaScript example
- match: '[^\s@*](?:[^*]|\*[^/])*'
captures:
'0':
name: source.embedded.ts
# Commenting out the embedded pattern matching since sublime doesnt support this
# patterns:
# - include: source.ts
# @kind type
- match: >-
(?x)
((@)kind)
\s+
(class|constant|event|external|file|function|member|mixin|module|namespace|typedef)
\b
captures:
'1': { name: storage.type.class.jsdoc }
'2': { name: punctuation.definition.block.tag.jsdoc }
'3': { name: constant.language.symbol-type.jsdoc }
# @see namepathOrURL
- match: |-
(?x)
((@)see)
\s+
(?:
# URL
(
(?=https?://)
(?:[^\s*]|\*[^/])+
)
|
# JSDoc namepath
(
(?!
# Avoid matching bare URIs (also acceptable as links)
https?://
|
# Avoid matching {@inline tags}; we match those below
(?:\[[^\[\]]*\])? # Possible description [preceding]{@tag}
{@(?:link|linkcode|linkplain|tutorial)\b
)
# Matched namepath
(?:[^@\s*/]|\*[^/])+
)
)
captures:
'1': { name: storage.type.class.jsdoc }
'2': { name: punctuation.definition.block.tag.jsdoc }
'3': { name: variable.other.link.underline.jsdoc }
'4': { name: entity.name.type.instance.jsdoc }
# @template Foo,Bar
- match: |-
(?x)
((@)template)
\s+
# One or more valid identifiers
(
[A-Za-z_$] # First character: non-numeric word character
[\w$.\[\]]* # Rest of identifier
(?: # Possible list of additional identifiers
\s* , \s*
[A-Za-z_$]
[\w$.\[\]]*
)*
)
captures:
'1': { name: storage.type.class.jsdoc }
'2': { name: punctuation.definition.block.tag.jsdoc }
'3':
name: variable.other.jsdoc
# Commenting out the embedded pattern matching since sublime doesnt support this
# patterns:
# - name: punctuation.delimiter.object.comma.jsdoc
# match: ','
# @template {Constraint} Foo
- begin: (?x)((@)template)\s+(?={)
beginCaptures:
'1': { name: storage.type.class.jsdoc }
'2': { name: punctuation.definition.block.tag.jsdoc }
end: (?=\s|\*/|[^{}\[\]A-Za-z_$])
patterns:
- include: '#jsdoctype'
- name: variable.other.jsdoc
# One valid identifier
match: ([A-Za-z_$][\w$.\[\]]*)
# Tags followed by an identifier token
# - @<tag> identifier
- match: |-
(?x)
(
(@)
(?:arg|argument|const|constant|member|namespace|param|var)
)
\s+
(
[A-Za-z_$]
[\w$.\[\]]*
)
captures:
'1': { name: storage.type.class.jsdoc }
'2': { name: punctuation.definition.block.tag.jsdoc }
'3': { name: variable.other.jsdoc }
# Tags followed by a type expression, then a namepath
# - @<tag> {type} namepath
- begin: ((@)typedef)\s+(?={)
beginCaptures:
'1': { name: storage.type.class.jsdoc }
'2': { name: punctuation.definition.block.tag.jsdoc }
end: (?=\s|\*/|[^{}\[\]A-Za-z_$])
patterns:
- include: '#jsdoctype'
- name: entity.name.type.instance.jsdoc
match: (?:[^@\s*/]|\*[^/])+
# Tags followed by a type expression, then an identifier
# - @<tag> {type} identifier
- begin: >-
((@)(?:arg|argument|const|constant|member|namespace|param|prop|property|var))\s+(?={)
beginCaptures:
'1': { name: storage.type.class.jsdoc }
'2': { name: punctuation.definition.block.tag.jsdoc }
end: (?=\s|\*/|[^{}\[\]A-Za-z_$])
patterns:
- include: '#jsdoctype'
- name: variable.other.jsdoc
match: ([A-Za-z_$][\w$.\[\]]*)
# Optional value
- name: variable.other.jsdoc
match: |-
(?x)
(\[)\s*
[\w$]+
(?:
(?:\[\])? # Foo[ ].bar properties within an array
\. # Foo.Bar namespaced parameter
[\w$]+
)*
(?:
\s*
(=) # [foo=bar] Default parameter value
\s*
(
# The inner regexes are to stop the match early at */ and to not stop at escaped quotes
(?>
"(?:(?:\*(?!/))|(?:\\(?!"))|[^*\\])*?" | # [foo="bar"] Double-quoted
'(?:(?:\*(?!/))|(?:\\(?!'))|[^*\\])*?' | # [foo='bar'] Single-quoted
\[ (?:(?:\*(?!/))|[^*])*? \] | # [foo=[1,2]] Array literal
(?:(?:\*(?!/))|\s(?!\s*\])|\[.*?(?:\]|(?=\*/))|[^*\s\[\]])* # Everything else
)*
)
)?
\s*(?:(\])((?:[^*\s]|\*[^\s/])+)?|(?=\*/))
captures:
'1': { name: punctuation.definition.optional-value.begin.bracket.square.jsdoc }
'2': { name: keyword.operator.assignment.jsdoc }
'3':
name: source.embedded.ts
# Commenting out the embedded pattern matching since sublime doesnt support this
# patterns:
# - include: '#inline-tags'
# - include: source.js
'4': { name: punctuation.definition.optional-value.end.bracket.square.jsdoc }
'5': { name: invalid.illegal.syntax.jsdoc }
# Tags followed by a type expression
# - @<tag> {type}
- begin: |-
(?x)
(
(@)
(?:define|enum|exception|export|extends|lends|implements|modifies
|namespace|private|protected|returns?|satisfies|suppress|this|throws|type
|yields?)
)
\s+(?={)
beginCaptures:
'1': { name: storage.type.class.jsdoc }
'2': { name: punctuation.definition.block.tag.jsdoc }
end: (?=\s|\*/|[^{}\[\]A-Za-z_$])
patterns:
- include: '#jsdoctype'
# Tags followed by a namepath
# - @<tag> namepath
- match: |-
(?x)
(
(@)
(?:alias|augments|callback|constructs|emits|event|fires|exports?
|extends|external|function|func|host|lends|listens|interface|memberof!?
|method|module|mixes|mixin|name|requires|see|this|typedef|uses)
)
\s+
(
(?:
[^{}@\s*] | \*[^/]
)+
)
captures:
'1': { name: storage.type.class.jsdoc }
'2': { name: punctuation.definition.block.tag.jsdoc }
'3': { name: entity.name.type.instance.jsdoc }
# Tags followed by a quoted arbitrary value
# - @<tag> "Quoted value"
- contentName: variable.other.jsdoc
begin: ((@)(?:default(?:value)?|license|version))\s+(([''"]))
beginCaptures:
'1': { name: storage.type.class.jsdoc }
'2': { name: punctuation.definition.block.tag.jsdoc }
'3': { name: variable.other.jsdoc }
'4': { name: punctuation.definition.string.begin.jsdoc }
end: (\3)|(?=$|\*/)
endCaptures:
'0': { name: variable.other.jsdoc }
'1': { name: punctuation.definition.string.end.jsdoc }
# Tags followed by an arbitrary value
# - @<tag> value
- match: ((@)(?:default(?:value)?|license|tutorial|variation|version))\s+([^\s*]+)
captures:
'1': { name: storage.type.class.jsdoc }
'2': { name: punctuation.definition.block.tag.jsdoc }
'3': { name: variable.other.jsdoc }
# Tags without arguments, or a tag without expected arguments. Because JSDoc permits
# tags to be spread across lines, we should at least highlight the opening tag for
# stuff like this:
#
# /**
# * @param
# * {type}
# * name
- name: storage.type.class.jsdoc
match: >-
(?x) (@)
(?:abstract|access|alias|api|arg|argument|async|attribute|augments|author|beta|borrows|bubbles
|callback|chainable|class|classdesc|code|config|const|constant|constructor|constructs|copyright
|default|defaultvalue|define|deprecated|desc|description|dict|emits|enum|event|example|exception
|exports?|extends|extension(?:_?for)?|external|externs|file|fileoverview|final|fires|for|func
|function|generator|global|hideconstructor|host|ignore|implements|implicitCast|inherit[Dd]oc
|inner|instance|interface|internal|kind|lends|license|listens|main|member|memberof!?|method
|mixes|mixins?|modifies|module|name|namespace|noalias|nocollapse|nocompile|nosideeffects
|override|overview|package|param|polymer(?:Behavior)?|preserve|private|prop|property|protected
|public|read[Oo]nly|record|require[ds]|returns?|see|since|static|struct|submodule|summary
|suppress|template|this|throws|todo|tutorial|type|typedef|unrestricted|uses|var|variation
|version|virtual|writeOnce|yields?)
\b
captures:
'1': { name: punctuation.definition.block.tag.jsdoc }
- include: '#inline-tags'
# any tag
- match: ((@)(?:{{identifier}}))(?=\s+)
captures:
'1': { name: storage.type.class.jsdoc }
'2': { name: punctuation.definition.block.tag.jsdoc }
brackets:
# Balanced brackets (square or curly)
patterns:
- begin: '{'
end: '}|(?=\*/)'
patterns:
- include: '#brackets'
- begin: '\['
end: '\]|(?=\*/)'
patterns:
- include: '#brackets'
inline-tags:
patterns:
# Description preceding {@inline tag}
- name: constant.other.description.jsdoc
match: (\[)[^\]]+(\])(?={@(?:link|linkcode|linkplain|tutorial))
captures:
'1': { name: punctuation.definition.bracket.square.begin.jsdoc }
'2': { name: punctuation.definition.bracket.square.end.jsdoc }
# {@link|@tutorial …}
- name: entity.name.type.instance.jsdoc
begin: ({)((@)(?:link(?:code|plain)?|tutorial))\s*
beginCaptures:
'1': { name: punctuation.definition.bracket.curly.begin.jsdoc }
'2': { name: storage.type.class.jsdoc }
'3': { name: punctuation.definition.inline.tag.jsdoc }
end: '}|(?=\*/)'
endCaptures:
'0': { name: punctuation.definition.bracket.curly.end.jsdoc }
patterns:
- match: \G((?=https?://)(?:[^|}\s*]|\*[/])+)(\|)?
captures:
'1': { name: variable.other.link.underline.jsdoc }
'2': { name: punctuation.separator.pipe.jsdoc }
- match: \G((?:[^{}@\s|*]|\*[^/])+)(\|)?
captures:
'1': { name: variable.other.description.jsdoc }
'2': { name: punctuation.separator.pipe.jsdoc }
jsdoctype:
# {type}
patterns:
# {unclosed
- name: invalid.illegal.type.jsdoc
match: \G{(?:[^}*]|\*[^/}])+$
- contentName: entity.name.type.instance.jsdoc
begin: \G({)
beginCaptures:
'0': { name: entity.name.type.instance.jsdoc }
'1': { name: punctuation.definition.bracket.curly.begin.jsdoc }
end: ((}))\s*|(?=\*/)
endCaptures:
'1': { name: entity.name.type.instance.jsdoc }
'2': { name: punctuation.definition.bracket.curly.end.jsdoc }
patterns:
- include: '#brackets'
...
================================================
FILE: TypeScript.YAML-tmTheme
================================================
# VS theme settings for TypeScript
---
name: TypeScript
uuid: 91489F9C-F403-4CF0-993D-EAAF9149E40E
settings:
- scope: storage.modifier, storage.type, keyword.other, keyword.operator.expression, keyword.operator.new, keyword.generator.asterisk, punctuation.definition.template-expression
settings: { vsclassificationtype: keyword }
- scope: constant.language, variable.language
settings: { vsclassificationtype: keyword }
- scope: keyword.control, keyword.operator.expression.delete, keyword.other.using, keyword.other.operator, entity.name.operator
settings: { vsclassificationtype: keyword - control }
- scope: support.class, support.type, entity.name.type, entity.name.namespace, entity.other.attribute, entity.name.scope-resolution, entity.name.class
settings: { vsclassificationtype: type }
- scope: string, punctuation.definition.string, constant.character
settings: { vsclassificationtype: string }
- scope: keyword.control.anchor.regexp, keyword.other.back-reference.regexp, keyword.operator.quantifier.regexp, keyword.operator.or.regexp, keyword.operator.negation.regexp, punctuation.definition.group.regexp, punctuation.definition.group.assertion.regexp, meta.assertion.look-ahead.regexp, meta.assertion.negative-look-ahead.regexp, punctuation.definition.group.capture.regexp, punctuation.definition.character-class.regexp, constant.other.character-class.range.regexp
settings: { vsclassificationtype: string }
- scope: constant.numeric, meta.delimiter.decimal.period.ts, constant.language.nan.ts, constant.language.infinity.ts
settings: { vsclassificationtype: number }
- scope: keyword.operator, storage.type.function.arrow.ts
settings: { vsclassificationtype: operator }
- scope: meta.brace.angle.ts, meta.brace.round.ts, meta.brace.square.ts, punctuation, constant.language.import-export-all.ts, meta.delimiter.object.comma.ts
settings: { vsclassificationtype: punctuation }
- scope: comment, comment.block.ts, comment.line.double-slash.ts, punctuation.definition.comment.ts
settings: { vsclassificationtype: comment }
- scope: comment.block.documentation.ts, other.meta.jsdoc, other.description.jsdoc
settings: { vsclassificationtype: comment }
- scope: entity.name.type.instance.jsdoc
settings: { vsclassificationtype: identifier }
- scope: entity.name.type.class.ts
settings: { vsclassificationtype: class name }
- scope: entity.name.type.module.ts
settings: { vsclassificationtype: module name }
- scope: entity.name.type.enum.ts
settings: { vsclassificationtype: enum name }
- scope: meta.template.expression.ts, entity.other.inherited-class.ts
settings: { vsclassificationtype: identifier }
- scope: variable, meta.definition.variable.name, support.variable, entity.name.variable, constant.other.placeholder
settings: { vsclassificationtype: local name }
- scope: entity.name.function, support.function, support.constant.handlebars, source.powershell variable.other.member, entity.name.operator.custom-literal
settings: { vsclassificationtype: method name }
- scope: variable.language.arguments.ts, support.type.object
settings: { vsclassificationtype: identifier }
- scope: entity.name.tag.inline, entity.name.tag.directive
settings: { vsclassificationtype: HTML Element Name }
- scope: entity.other.attribute-name
settings: { vsclassificationtype: HTML Attribute Name }
- scope: meta.tag string.quoted, meta.tag string.quoted punctuation.definition.string, meta.tag string.quoted
settings: { vsclassificationtype: string }
- scope: meta.object-literal.key
settings: { vsclassificationtype: parameter name }
- scope: constant.character.escape
settings: { vsclassificationtype: string - escape character }
- scope: entity.name.label
settings: { vsclassificationtype: label name }
...
================================================
FILE: TypeScript.tmLanguage
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>TypeScript</string>
<key>scopeName</key>
<string>source.ts</string>
<key>fileTypes</key>
<array>
<string>ts</string>
</array>
<key>uuid</key>
<string>ef98eb90-bf9b-11e4-bb52-0800200c9a66</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#directives</string>
</dict>
<dict>
<key>include</key>
<string>#statements</string>
</dict>
<dict>
<key>include</key>
<string>#shebang</string>
</dict>
</array>
<key>repository</key>
<dict>
<key>shebang</key>
<dict>
<key>name</key>
<string>comment.line.shebang.ts</string>
<key>match</key>
<string>\A(#!).*(?=$)</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.comment.ts</string>
</dict>
</dict>
</dict>
<key>statements</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#declaration</string>
</dict>
<dict>
<key>include</key>
<string>#control-statement</string>
</dict>
<dict>
<key>include</key>
<string>#after-operator-block-as-object-literal</string>
</dict>
<dict>
<key>include</key>
<string>#decl-block</string>
</dict>
<dict>
<key>include</key>
<string>#label</string>
</dict>
<dict>
<key>include</key>
<string>#expression</string>
</dict>
<dict>
<key>include</key>
<string>#punctuation-semicolon</string>
</dict>
<dict>
<key>include</key>
<string>#string</string>
</dict>
<dict>
<key>include</key>
<string>#comment</string>
</dict>
</array>
</dict>
<key>declaration</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#decorator</string>
</dict>
<dict>
<key>include</key>
<string>#var-expr</string>
</dict>
<dict>
<key>include</key>
<string>#function-declaration</string>
</dict>
<dict>
<key>include</key>
<string>#class-declaration</string>
</dict>
<dict>
<key>include</key>
<string>#interface-declaration</string>
</dict>
<dict>
<key>include</key>
<string>#enum-declaration</string>
</dict>
<dict>
<key>include</key>
<string>#namespace-declaration</string>
</dict>
<dict>
<key>include</key>
<string>#type-alias-declaration</string>
</dict>
<dict>
<key>include</key>
<string>#import-equals-declaration</string>
</dict>
<dict>
<key>include</key>
<string>#import-declaration</string>
</dict>
<dict>
<key>include</key>
<string>#export-declaration</string>
</dict>
<dict>
<key>name</key>
<string>storage.modifier.ts</string>
<key>match</key>
<string>(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(declare|export)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))</string>
</dict>
</array>
</dict>
<key>control-statement</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#switch-statement</string>
</dict>
<dict>
<key>include</key>
<string>#for-loop</string>
</dict>
<dict>
<key>name</key>
<string>keyword.control.trycatch.ts</string>
<key>match</key>
<string>(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(catch|finally|throw|try)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))</string>
</dict>
<dict>
<key>match</key>
<string>(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(break|continue|goto)\s+([_$[:alpha:]][_$[:alnum:]]*)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.control.loop.ts</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>entity.name.label.ts</string>
</dict>
</dict>
</dict>
<dict>
<key>name</key>
<string>keyword.control.loop.ts</string>
<key>match</key>
<string>(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(break|continue|do|goto|while)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))</string>
</dict>
<dict>
<key>begin</key>
<string>(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(return)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>keyword.control.flow.ts</string>
</dict>
</dict>
<key>end</key>
<string>(?=[;}]|$|;|^\s*$|(?:^\s*(?:abstract|async|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|var|while)\b))</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#expression</string>
</dict>
</array>
</dict>
<dict>
<key>name</key>
<string>keyword.control.switch.ts</string>
<key>match</key>
<string>(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(case|default|switch)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))</string>
</dict>
<dict>
<key>include</key>
<string>#if-statement</string>
</dict>
<dict>
<key>name</key>
<string>keyword.control.conditional.ts</string>
<key>match</key>
<string>(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(else|if)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))</string>
</dict>
<dict>
<key>name</key>
<string>keyword.control.with.ts</string>
<key>match</key>
<string>(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(with)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))</string>
</dict>
<dict>
<key>name</key>
<string>keyword.control.ts</string>
<key>match</key>
<string>(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(package)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))</string>
</dict>
<dict>
<key>name</key>
<string>keyword.other.debugger.ts</string>
<key>match</key>
<string>(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(debugger)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))</string>
</dict>
</array>
</dict>
<key>label</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>([_$[:alpha:]][_$[:alnum:]]*)\s*(:)(?=\s*\{)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>entity.name.label.ts</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>punctuation.separator.label.ts</string>
</dict>
</dict>
<key>end</key>
<string>(?<=\})</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#decl-block</string>
</dict>
</array>
</dict>
<dict>
<key>match</key>
<string>([_$[:alpha:]][_$[:alnum:]]*)\s*(:)</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>entity.name.label.ts</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>punctuation.separator.label.ts</string>
</dict>
</dict>
</dict>
</array>
</dict>
<key>expression</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#expressionWithoutIdentifiers</string>
</dict>
<dict>
<key>include</key>
<string>#identifiers</string>
</dict>
<dict>
<key>include</key>
<string>#expressionPunctuations</string>
</dict>
</array>
</dict>
<key>expressionWithoutIdentifiers</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#string</string>
</dict>
<dict>
<key>include</key>
<string>#regex</string>
</dict>
<dict>
<key>include</key>
<string>#comment</string>
</dict>
<dict>
<key>include</key>
<string>#function-expression</string>
</dict>
<dict>
<key>include</key>
<string>#class-expression</string>
</dict>
<dict>
<key>include</key>
<string>#arrow-function</string>
</dict>
<dict>
<key>include</key>
<string>#paren-expression-possibly-arrow</string>
</dict>
<dict>
<key>include</key>
<string>#cast</string>
</dict>
<dict>
<key>include</key>
<string>#ternary-expression</string>
</dict>
<dict>
<key>include</key>
<string>#new-expr</string>
</dict>
<dict>
<key>include</key>
<string>#instanceof-expr</string>
</dict>
<dict>
<key>include</key>
<string>#object-literal</string>
</dict>
<dict>
<key>include</key>
<string>#expression-operators</string>
</dict>
<dict>
<key>include</key>
<string>#function-call</string>
</dict>
<dict>
<key>include</key>
<string>#literal</string>
</dict>
<dict>
<key>include</key>
<string>#support-objects</string>
</dict>
<dict>
<key>include</key>
<string>#paren-expression</string>
</dict>
</array>
</dict>
<key>expressionPunctuations</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#punctuation-comma</string>
</dict>
<dict>
<key>include</key>
<string>#punctuation-accessor</string>
</dict>
</array>
</dict>
<key>decorator</key>
<dict>
<key>name</key>
<string>meta.decorator.ts</string>
<key>begin</key>
<string>(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))\@</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.decorator.ts</string>
</dict>
</dict>
<key>end</key>
<string>(?=\s)</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#expression</string>
</dict>
</array>
</dict>
<key>var-expr</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>name</key>
<string>meta.var.expr.ts</string>
<key>begin</key>
<string>(?=(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(var|let)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))</string>
<key>end</key>
<string>(?!(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(var|let)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))((?=^|;|}|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)|;|^\s*$|(?:^\s*(?:abstract|async|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|var|while)\b))|((?<!^let|[^\._$[:alnum:]]let|^var|[^\._$[:alnum:]]var)(?=\s*$)))</string>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(var|let)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.control.export.ts</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>storage.modifier.ts</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>storage.type.ts</string>
</dict>
</dict>
<key>end</key>
<string>(?=\S)</string>
</dict>
<dict>
<key>include</key>
<string>#destructuring-variable</string>
</dict>
<dict>
<key>include</key>
<string>#var-single-variable</string>
</dict>
<dict>
<key>include</key>
<string>#variable-initializer</string>
</dict>
<dict>
<key>include</key>
<string>#comment</string>
</dict>
<dict>
<key>begin</key>
<string>(,)\s*(?=$|\/\/)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.separator.comma.ts</string>
</dict>
</dict>
<key>end</key>
<string>(?<!,)(((?==|;|}|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)|^\s*$))|((?<=\S)(?=\s*$)))</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#single-line-comment-consuming-line-ending</string>
</dict>
<dict>
<key>include</key>
<string>#comment</string>
</dict>
<dict>
<key>include</key>
<string>#destructuring-variable</string>
</dict>
<dict>
<key>include</key>
<string>#var-single-variable</string>
</dict>
<dict>
<key>include</key>
<string>#punctuation-comma</string>
</dict>
</array>
</dict>
<dict>
<key>include</key>
<string>#punctuation-comma</string>
</dict>
</array>
</dict>
<dict>
<key>name</key>
<string>meta.var.expr.ts</string>
<key>begin</key>
<string>(?=(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(const(?!\s+enum\b))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.control.export.ts</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>storage.modifier.ts</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>storage.type.ts</string>
</dict>
</dict>
<key>end</key>
<string>(?!(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(const(?!\s+enum\b))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))((?=^|;|}|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)|;|^\s*$|(?:^\s*(?:abstract|async|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|var|while)\b))|((?<!^const|[^\._$[:alnum:]]const)(?=\s*$)))</string>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(const(?!\s+enum\b))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.control.export.ts</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>storage.modifier.ts</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>storage.type.ts</string>
</dict>
</dict>
<key>end</key>
<string>(?=\S)</string>
</dict>
<dict>
<key>include</key>
<string>#destructuring-const</string>
</dict>
<dict>
<key>include</key>
<string>#var-single-const</string>
</dict>
<dict>
<key>include</key>
<string>#variable-initializer</string>
</dict>
<dict>
<key>include</key>
<string>#comment</string>
</dict>
<dict>
<key>begin</key>
<string>(,)\s*(?=$|\/\/)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.separator.comma.ts</string>
</dict>
</dict>
<key>end</key>
<string>(?<!,)(((?==|;|}|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)|^\s*$))|((?<=\S)(?=\s*$)))</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#single-line-comment-consuming-line-ending</string>
</dict>
<dict>
<key>include</key>
<string>#comment</string>
</dict>
<dict>
<key>include</key>
<string>#destructuring-const</string>
</dict>
<dict>
<key>include</key>
<string>#var-single-const</string>
</dict>
<dict>
<key>include</key>
<string>#punctuation-comma</string>
</dict>
</array>
</dict>
<dict>
<key>include</key>
<string>#punctuation-comma</string>
</dict>
</array>
</dict>
<dict>
<key>name</key>
<string>meta.var.expr.ts</string>
<key>begin</key>
<string>(?=(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b((?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.control.export.ts</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>storage.modifier.ts</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>storage.type.ts</string>
</dict>
</dict>
<key>end</key>
<string>(?!(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b((?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))((?=;|}|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)|;|^\s*$|(?:^\s*(?:abstract|async|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|var|while)\b))|((?<!^using|[^\._$[:alnum:]]using|^await\s+using|[^\._$[:alnum:]]await\s+using)(?=\s*$)))</string>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b((?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.control.export.ts</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>storage.modifier.ts</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>storage.type.ts</string>
</dict>
</dict>
<key>end</key>
<string>(?=\S)</string>
</dict>
<dict>
<key>include</key>
<string>#var-single-const</string>
</dict>
<dict>
<key>include</key>
<string>#variable-initializer</string>
</dict>
<dict>
<key>include</key>
<string>#comment</string>
</dict>
<dict>
<key>begin</key>
<string>(,)\s*((?!\S)|(?=\/\/))</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.separator.comma.ts</string>
</dict>
</dict>
<key>end</key>
<string>(?<!,)(((?==|;|}|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)|^\s*$))|((?<=\S)(?=\s*$)))</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#single-line-comment-consuming-line-ending</string>
</dict>
<dict>
<key>include</key>
<string>#comment</string>
</dict>
<dict>
<key>include</key>
<string>#var-single-const</string>
</dict>
<dict>
<key>include</key>
<string>#punctuation-comma</string>
</dict>
</array>
</dict>
<dict>
<key>include</key>
<string>#punctuation-comma</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>var-single-variable</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>name</key>
<string>meta.var-single-variable.expr.ts</string>
<key>begin</key>
<string>(?x)([_$[:alpha:]][_$[:alnum:]]*)(\!)?(?=\s*
# function assignment |
(=\s*(
((async\s+)?(
(function\s*[(<*]) |
(function\s+) |
([_$[:alpha:]][_$[:alnum:]]*\s*=>)
)) |
((async\s*)?(
((<\s*$)|((<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^
gitextract_wrlgz6ya/
├── .gitattributes
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ └── bug_report.md
│ └── workflows/
│ ├── CI.yml
│ └── accept-baselines.yml
├── .gitignore
├── .vscode/
│ └── settings.json
├── Comments.tmPreferences
├── ErrorList.YAML-tmLanguage
├── FindRefs.YAML-tmLanguage
├── LICENSE.txt
├── README.md
├── SECURITY.md
├── ThirdPartyNotices.txt
├── TypeScript Indent.YAML-tmPreferences
├── TypeScript Indent.tmPreferences
├── TypeScript.YAML-tmLanguage
├── TypeScript.YAML-tmTheme
├── TypeScript.tmLanguage
├── TypeScript.tmTheme
├── TypeScriptReact.YAML-tmLanguage
├── TypeScriptReact.YAML-tmTheme
├── TypeScriptReact.tmLanguage
├── TypeScriptReact.tmTheme
├── build/
│ ├── build.ts
│ ├── index.d.ts
│ └── tsconfig.json
├── package.json
└── tests/
├── baselines/
│ ├── Abstracts.baseline.txt
│ ├── ArrowFunctionInsideTypeAssertion.baseline.txt
│ ├── AsConstSatisfies.baseline.txt
│ ├── Comments.baseline.txt
│ ├── FunctionMethodOverloads.baseline.txt
│ ├── FunctionMethodParameters.baseline.txt
│ ├── FunctionMethodReturnTypes.baseline.txt
│ ├── Issue10.baseline.txt
│ ├── Issue1006.baseline.txt
│ ├── Issue11.baseline.txt
│ ├── Issue110.baseline.txt
│ ├── Issue112.baseline.txt
│ ├── Issue114.baseline.txt
│ ├── Issue115.baseline.txt
│ ├── Issue119.baseline.txt
│ ├── Issue124.baseline.txt
│ ├── Issue131.baseline.txt
│ ├── Issue133.baseline.txt
│ ├── Issue135.baseline.txt
│ ├── Issue139.baseline.txt
│ ├── Issue142.baseline.txt
│ ├── Issue143.baseline.txt
│ ├── Issue146.baseline.txt
│ ├── Issue148.baseline.txt
│ ├── Issue149.baseline.txt
│ ├── Issue152.baseline.txt
│ ├── Issue153.baseline.txt
│ ├── Issue154.baseline.txt
│ ├── Issue155.baseline.txt
│ ├── Issue156.baseline.txt
│ ├── Issue157.baseline.txt
│ ├── Issue158.baseline.txt
│ ├── Issue161.baseline.txt
│ ├── Issue163.baseline.txt
│ ├── Issue166.baseline.txt
│ ├── Issue171.baseline.txt
│ ├── Issue172.baseline.txt
│ ├── Issue175.baseline.txt
│ ├── Issue177.baseline.txt
│ ├── Issue178.baseline.txt
│ ├── Issue180.baseline.txt
│ ├── Issue182.baseline.txt
│ ├── Issue183.baseline.txt
│ ├── Issue186.baseline.txt
│ ├── Issue187.baseline.txt
│ ├── Issue191.baseline.txt
│ ├── Issue193.baseline.txt
│ ├── Issue197.baseline.txt
│ ├── Issue198.baseline.txt
│ ├── Issue200.baseline.txt
│ ├── Issue202.baseline.txt
│ ├── Issue203.baseline.txt
│ ├── Issue206.baseline.txt
│ ├── Issue208.baseline.txt
│ ├── Issue212.baseline.txt
│ ├── Issue215.baseline.txt
│ ├── Issue216.baseline.txt
│ ├── Issue217.baseline.txt
│ ├── Issue218.baseline.txt
│ ├── Issue219.baseline.txt
│ ├── Issue22.baseline.txt
│ ├── Issue221.baseline.txt
│ ├── Issue223.baseline.txt
│ ├── Issue226.baseline.txt
│ ├── Issue230.baseline.txt
│ ├── Issue232.baseline.txt
│ ├── Issue235.baseline.txt
│ ├── Issue236.baseline.txt
│ ├── Issue237.baseline.txt
│ ├── Issue239.baseline.txt
│ ├── Issue241.baseline.txt
│ ├── Issue243.baseline.txt
│ ├── Issue244.baseline.txt
│ ├── Issue247.baseline.txt
│ ├── Issue248.baseline.txt
│ ├── Issue249.baseline.txt
│ ├── Issue250.baseline.txt
│ ├── Issue251.baseline.txt
│ ├── Issue252.baseline.txt
│ ├── Issue262.baseline.txt
│ ├── Issue264.baseline.txt
│ ├── Issue276.baseline.txt
│ ├── Issue28.baseline.txt
│ ├── Issue280.baseline.txt
│ ├── Issue283.baseline.txt
│ ├── Issue285.baseline.txt
│ ├── Issue288.baseline.txt
│ ├── Issue292.baseline.txt
│ ├── Issue294.baseline.txt
│ ├── Issue3.baseline.txt
│ ├── Issue304.baseline.txt
│ ├── Issue305.baseline.txt
│ ├── Issue307.baseline.txt
│ ├── Issue314.baseline.txt
│ ├── Issue318.baseline.txt
│ ├── Issue32.baseline.txt
│ ├── Issue321.baseline.txt
│ ├── Issue322.baseline.txt
│ ├── Issue326.baseline.txt
│ ├── Issue334.baseline.txt
│ ├── Issue335.baseline.txt
│ ├── Issue337.baseline.txt
│ ├── Issue338.baseline.txt
│ ├── Issue339.baseline.txt
│ ├── Issue343.baseline.txt
│ ├── Issue344.baseline.txt
│ ├── Issue346.baseline.txt
│ ├── Issue347.baseline.txt
│ ├── Issue351.baseline.txt
│ ├── Issue356.baseline.txt
│ ├── Issue357.baseline.txt
│ ├── Issue359.baseline.txt
│ ├── Issue36.baseline.txt
│ ├── Issue361.baseline.txt
│ ├── Issue365.baseline.txt
│ ├── Issue366.baseline.txt
│ ├── Issue368.baseline.txt
│ ├── Issue37.baseline.txt
│ ├── Issue375.baseline.txt
│ ├── Issue376.baseline.txt
│ ├── Issue377.baseline.txt
│ ├── Issue379.baseline.txt
│ ├── Issue380.baseline.txt
│ ├── Issue381.baseline.txt
│ ├── Issue382.baseline.txt
│ ├── Issue383.baseline.txt
│ ├── Issue384.baseline.txt
│ ├── Issue387.baseline.txt
│ ├── Issue388.baseline.txt
│ ├── Issue389.baseline.txt
│ ├── Issue391.baseline.txt
│ ├── Issue393.baseline.txt
│ ├── Issue394.baseline.txt
│ ├── Issue396.baseline.txt
│ ├── Issue397.baseline.txt
│ ├── Issue398.baseline.txt
│ ├── Issue402.baseline.txt
│ ├── Issue403IncorrectlyDetectedArrowTypeParameters.baseline.txt
│ ├── Issue403IncorrectlyDetectedFunctionCallAsArrow.baseline.txt
│ ├── Issue405.baseline.txt
│ ├── Issue407.baseline.txt
│ ├── Issue408.baseline.txt
│ ├── Issue415.baseline.txt
│ ├── Issue417.baseline.txt
│ ├── Issue418.baseline.txt
│ ├── Issue42.baseline.txt
│ ├── Issue420.baseline.txt
│ ├── Issue421.baseline.txt
│ ├── Issue423.baseline.txt
│ ├── Issue427.baseline.txt
│ ├── Issue428.baseline.txt
│ ├── Issue43.baseline.txt
│ ├── Issue430.baseline.txt
│ ├── Issue431.baseline.txt
│ ├── Issue433.baseline.txt
│ ├── Issue434.baseline.txt
│ ├── Issue435.baseline.txt
│ ├── Issue44.baseline.txt
│ ├── Issue441.baseline.txt
│ ├── Issue444.baseline.txt
│ ├── Issue445.baseline.txt
│ ├── Issue450.baseline.txt
│ ├── Issue452.baseline.txt
│ ├── Issue453.baseline.txt
│ ├── Issue455.baseline.txt
│ ├── Issue458.baseline.txt
│ ├── Issue460.baseline.txt
│ ├── Issue461.baseline.txt
│ ├── Issue463.baseline.txt
│ ├── Issue466.baseline.txt
│ ├── Issue468.baseline.txt
│ ├── Issue470.baseline.txt
│ ├── Issue471.baseline.txt
│ ├── Issue472.baseline.txt
│ ├── Issue476.baseline.txt
│ ├── Issue477.baseline.txt
│ ├── Issue478.baseline.txt
│ ├── Issue480.baseline.txt
│ ├── Issue482.baseline.txt
│ ├── Issue484.baseline.txt
│ ├── Issue485.baseline.txt
│ ├── Issue486.baseline.txt
│ ├── Issue491.baseline.txt
│ ├── Issue496.baseline.txt
│ ├── Issue499.baseline.txt
│ ├── Issue5.baseline.txt
│ ├── Issue500.baseline.txt
│ ├── Issue502.baseline.txt
│ ├── Issue506.baseline.txt
│ ├── Issue510.baseline.txt
│ ├── Issue513.baseline.txt
│ ├── Issue515.baseline.txt
│ ├── Issue518.baseline.txt
│ ├── Issue521.baseline.txt
│ ├── Issue522.baseline.txt
│ ├── Issue525.baseline.txt
│ ├── Issue526.baseline.txt
│ ├── Issue530.baseline.txt
│ ├── Issue531.baseline.txt
│ ├── Issue536.baseline.txt
│ ├── Issue538.baseline.txt
│ ├── Issue540.baseline.txt
│ ├── Issue543.baseline.txt
│ ├── Issue549.baseline.txt
│ ├── Issue550.baseline.txt
│ ├── Issue551.baseline.txt
│ ├── Issue554.baseline.txt
│ ├── Issue556.baseline.txt
│ ├── Issue558.baseline.txt
│ ├── Issue559.baseline.txt
│ ├── Issue562.baseline.txt
│ ├── Issue566.baseline.txt
│ ├── Issue567.baseline.txt
│ ├── Issue569.baseline.txt
│ ├── Issue571.baseline.txt
│ ├── Issue572.baseline.txt
│ ├── Issue572ForLoop.baseline.txt
│ ├── Issue575.baseline.txt
│ ├── Issue578.baseline.txt
│ ├── Issue579.baseline.txt
│ ├── Issue580.baseline.txt
│ ├── Issue581.baseline.txt
│ ├── Issue584.baseline.txt
│ ├── Issue585.baseline.txt
│ ├── Issue586.baseline.txt
│ ├── Issue59.baseline.txt
│ ├── Issue590.baseline.txt
│ ├── Issue591.baseline.txt
│ ├── Issue592.baseline.txt
│ ├── Issue595.baseline.txt
│ ├── Issue598.baseline.txt
│ ├── Issue601.baseline.txt
│ ├── Issue602.baseline.txt
│ ├── Issue604.baseline.txt
│ ├── Issue605.baseline.txt
│ ├── Issue606.baseline.txt
│ ├── Issue607.baseline.txt
│ ├── Issue608.baseline.txt
│ ├── Issue609.baseline.txt
│ ├── Issue610.baseline.txt
│ ├── Issue612.baseline.txt
│ ├── Issue613.baseline.txt
│ ├── Issue616.baseline.txt
│ ├── Issue62.baseline.txt
│ ├── Issue623.baseline.txt
│ ├── Issue624.baseline.txt
│ ├── Issue625.baseline.txt
│ ├── Issue626.baseline.txt
│ ├── Issue628.baseline.txt
│ ├── Issue629.baseline.txt
│ ├── Issue63.baseline.txt
│ ├── Issue632.baseline.txt
│ ├── Issue634.baseline.txt
│ ├── Issue635.baseline.txt
│ ├── Issue636.baseline.txt
│ ├── Issue637.baseline.txt
│ ├── Issue637a.baseline.txt
│ ├── Issue637b.baseline.txt
│ ├── Issue638.baseline.txt
│ ├── Issue639.baseline.txt
│ ├── Issue64.baseline.txt
│ ├── Issue642.baseline.txt
│ ├── Issue643.baseline.txt
│ ├── Issue646.baseline.txt
│ ├── Issue647.baseline.txt
│ ├── Issue65.baseline.txt
│ ├── Issue650.baseline.txt
│ ├── Issue651.baseline.txt
│ ├── Issue652.baseline.txt
│ ├── Issue653.baseline.txt
│ ├── Issue654.baseline.txt
│ ├── Issue66.baseline.txt
│ ├── Issue661.baseline.txt
│ ├── Issue662.baseline.txt
│ ├── Issue663.baseline.txt
│ ├── Issue665.baseline.txt
│ ├── Issue666.baseline.txt
│ ├── Issue667.baseline.txt
│ ├── Issue668.baseline.txt
│ ├── Issue670.baseline.txt
│ ├── Issue672.baseline.txt
│ ├── Issue673.baseline.txt
│ ├── Issue674.baseline.txt
│ ├── Issue675.baseline.txt
│ ├── Issue677.baseline.txt
│ ├── Issue677arrow.baseline.txt
│ ├── Issue683.baseline.txt
│ ├── Issue684.baseline.txt
│ ├── Issue685.baseline.txt
│ ├── Issue686.baseline.txt
│ ├── Issue687.baseline.txt
│ ├── Issue688.baseline.txt
│ ├── Issue689.baseline.txt
│ ├── Issue692.baseline.txt
│ ├── Issue695.baseline.txt
│ ├── Issue698.baseline.txt
│ ├── Issue701.baseline.txt
│ ├── Issue702.baseline.txt
│ ├── Issue711.baseline.txt
│ ├── Issue715.baseline.txt
│ ├── Issue717.baseline.txt
│ ├── Issue720.baseline.txt
│ ├── Issue721.baseline.txt
│ ├── Issue724.baseline.txt
│ ├── Issue727.baseline.txt
│ ├── Issue728.baseline.txt
│ ├── Issue730.baseline.txt
│ ├── Issue732.baseline.txt
│ ├── Issue737.baseline.txt
│ ├── Issue741.baseline.txt
│ ├── Issue743.baseline.txt
│ ├── Issue744.baseline.txt
│ ├── Issue748.baseline.txt
│ ├── Issue750.baseline.txt
│ ├── Issue751.baseline.txt
│ ├── Issue754.baseline.txt
│ ├── Issue756.baseline.txt
│ ├── Issue760.baseline.txt
│ ├── Issue762.baseline.txt
│ ├── Issue763.baseline.txt
│ ├── Issue766.baseline.txt
│ ├── Issue77.baseline.txt
│ ├── Issue774.baseline.txt
│ ├── Issue780.baseline.txt
│ ├── Issue782.baseline.txt
│ ├── Issue785.baseline.txt
│ ├── Issue786.baseline.txt
│ ├── Issue787.baseline.txt
│ ├── Issue790.baseline.txt
│ ├── Issue791.baseline.txt
│ ├── Issue793.baseline.txt
│ ├── Issue794.baseline.txt
│ ├── Issue796.baseline.txt
│ ├── Issue797.baseline.txt
│ ├── Issue811.baseline.txt
│ ├── Issue816.baseline.txt
│ ├── Issue82.baseline.txt
│ ├── Issue822.baseline.txt
│ ├── Issue823.baseline.txt
│ ├── Issue832.baseline.txt
│ ├── Issue836.baseline.txt
│ ├── Issue840.baseline.txt
│ ├── Issue841.baseline.txt
│ ├── Issue844.baseline.txt
│ ├── Issue846.baseline.txt
│ ├── Issue850.baseline.txt
│ ├── Issue858.baseline.txt
│ ├── Issue868.baseline.txt
│ ├── Issue87.baseline.txt
│ ├── Issue870.baseline.txt
│ ├── Issue88.baseline.txt
│ ├── Issue89.baseline.txt
│ ├── Issue90.baseline.txt
│ ├── Issue921.baseline.txt
│ ├── Issue923.baseline.txt
│ ├── Issue924.baseline.txt
│ ├── Issue96.baseline.txt
│ ├── Issue964.baseline.txt
│ ├── Issue975.baseline.txt
│ ├── Issues573.baseline.txt
│ ├── Issues597.baseline.txt
│ ├── Issues648.baseline.txt
│ ├── Issues649.baseline.txt
│ ├── ParameterProperties.baseline.txt
│ ├── SyntacticallyIncorrectStrings.baseline.txt
│ ├── TsxSamples.baseline.txt
│ ├── arbitraryModuleNamespaceIdentifiers.baseline.txt
│ ├── arrow.baseline.txt
│ ├── arrowInsideCall.baseline.txt
│ ├── assertions.baseline.txt
│ ├── autoAccessor.baseline.txt
│ ├── awaitColoring.baseline.txt
│ ├── awaitUsedInExpression.baseline.txt
│ ├── awaitUsing.baseline.txt
│ ├── awaited.baseline.txt
│ ├── bigint.baseline.txt
│ ├── binder.baseline.txt
│ ├── conditionalTypes.baseline.txt
│ ├── constType.baseline.txt
│ ├── constTypeAssert.baseline.txt
│ ├── constTypeParameter.baseline.txt
│ ├── constants.baseline.txt
│ ├── constructorType.baseline.txt
│ ├── destructuringWithDefaults.baseline.txt
│ ├── directives.baseline.txt
│ ├── docComments.baseline.txt
│ ├── enumMemberWithIntializer.baseline.txt
│ ├── enumMemberWithQuotedMemberName.baseline.txt
│ ├── exportDeclarations.baseline.txt
│ ├── forof.baseline.txt
│ ├── generator.baseline.txt
│ ├── genericTaggedTemplate.baseline.txt
│ ├── importAssert.baseline.txt
│ ├── importTypeOnly.baseline.txt
│ ├── importTypes.baseline.txt
│ ├── inferTypes.baseline.txt
│ ├── intrinsic.baseline.txt
│ ├── issue1005.baseline.txt
│ ├── issue327.baseline.txt
│ ├── issue522_1.baseline.txt
│ ├── issue534.baseline.txt
│ ├── issue776.baseline.txt
│ ├── issue806.baseline.txt
│ ├── issue807.baseline.txt
│ ├── issue807ts.baseline.txt
│ ├── issue809.baseline.txt
│ ├── issue812.baseline.txt
│ ├── issue814.baseline.txt
│ ├── issue824.baseline.txt
│ ├── issue907.baseline.txt
│ ├── issue909.baseline.txt
│ ├── issue916.baseline.txt
│ ├── issue927.baseline.txt
│ ├── issue930.baseline.txt
│ ├── issue932.baseline.txt
│ ├── issue935.baseline.txt
│ ├── issue940.baseline.txt
│ ├── issue948.baseline.txt
│ ├── issue949.baseline.txt
│ ├── issue951.baseline.txt
│ ├── issue957.baseline.txt
│ ├── issue971.baseline.txt
│ ├── javascript.baseline.txt
│ ├── javascriptClasses.baseline.txt
│ ├── jsdocProperty.baseline.txt
│ ├── jsdocType.baseline.txt
│ ├── jsxTagWithTypeArguments.baseline.txt
│ ├── keyof.baseline.txt
│ ├── mappedType.baseline.txt
│ ├── modifierOperators.baseline.txt
│ ├── multilineArrow.baseline.txt
│ ├── multilineDestructuringParametersOfArrow.baseline.txt
│ ├── multineTag.baseline.txt
│ ├── multipleVariableDeclaration.baseline.txt
│ ├── namedTuples.baseline.txt
│ ├── namespaceAndModule.baseline.txt
│ ├── notMultilineArrow1.baseline.txt
│ ├── notMultilineArrow2.baseline.txt
│ ├── notMultilineArrow3.baseline.txt
│ ├── numeric.baseline.txt
│ ├── numericAsType.baseline.txt
│ ├── objectLiteral.baseline.txt
│ ├── objectLiteralWithCast.baseline.txt
│ ├── objectType.baseline.txt
│ ├── optionalChaining.baseline.txt
│ ├── parameterBindingPattern.baseline.txt
│ ├── partialTypeArguments.baseline.txt
│ ├── pr48_noSemiColon.baseline.txt
│ ├── pr557_namespacedJsx.baseline.txt
│ ├── privateFields.baseline.txt
│ ├── property.baseline.txt
│ ├── propertyNameInObjectBindingElement.baseline.txt
│ ├── readonly.baseline.txt
│ ├── readonlyModifier.baseline.txt
│ ├── regexp.baseline.txt
│ ├── resolutionMode.baseline.txt
│ ├── restAndSpreadExpression.baseline.txt
│ ├── restInBindingPattern.baseline.txt
│ ├── satisfies.baseline.txt
│ ├── specialNew.baseline.txt
│ ├── templateLiteralType.baseline.txt
│ ├── typeofClass.baseline.txt
│ ├── typeparameterDefault.baseline.txt
│ ├── using.baseline.txt
│ ├── variableBindingPattern.baseline.txt
│ └── varianceAnnotations.baseline.txt
├── build.ts
├── cases/
│ ├── Abstracts.ts
│ ├── ArrowFunctionInsideTypeAssertion.ts
│ ├── AsConstSatisfies.ts
│ ├── Comments.ts
│ ├── FunctionMethodOverloads.ts
│ ├── FunctionMethodParameters.ts
│ ├── FunctionMethodReturnTypes.ts
│ ├── Issue10.ts
│ ├── Issue1006.ts
│ ├── Issue11.ts
│ ├── Issue110.ts
│ ├── Issue112.ts
│ ├── Issue114.ts
│ ├── Issue115.ts
│ ├── Issue119.ts
│ ├── Issue124.ts
│ ├── Issue131.ts
│ ├── Issue133.ts
│ ├── Issue135.ts
│ ├── Issue139.ts
│ ├── Issue142.ts
│ ├── Issue143.ts
│ ├── Issue146.ts
│ ├── Issue148.ts
│ ├── Issue149.ts
│ ├── Issue152.ts
│ ├── Issue153.ts
│ ├── Issue154.ts
│ ├── Issue155.ts
│ ├── Issue156.ts
│ ├── Issue157.ts
│ ├── Issue158.ts
│ ├── Issue161.tsx
│ ├── Issue163.ts
│ ├── Issue166.ts
│ ├── Issue171.ts
│ ├── Issue172.ts
│ ├── Issue175.ts
│ ├── Issue177.ts
│ ├── Issue178.ts
│ ├── Issue180.ts
│ ├── Issue182.ts
│ ├── Issue183.ts
│ ├── Issue186.ts
│ ├── Issue187.ts
│ ├── Issue191.ts
│ ├── Issue193.ts
│ ├── Issue197.ts
│ ├── Issue198.ts
│ ├── Issue200.ts
│ ├── Issue202.tsx
│ ├── Issue203.ts
│ ├── Issue206.ts
│ ├── Issue208.ts
│ ├── Issue212.ts
│ ├── Issue215.ts
│ ├── Issue216.ts
│ ├── Issue217.ts
│ ├── Issue218.ts
│ ├── Issue219.ts
│ ├── Issue22.ts
│ ├── Issue221.ts
│ ├── Issue223.ts
│ ├── Issue226.ts
│ ├── Issue230.ts
│ ├── Issue232.ts
│ ├── Issue235.ts
│ ├── Issue236.ts
│ ├── Issue237.ts
│ ├── Issue239.tsx
│ ├── Issue241.ts
│ ├── Issue243.ts
│ ├── Issue244.ts
│ ├── Issue247.tsx
│ ├── Issue248.ts
│ ├── Issue249.ts
│ ├── Issue250.ts
│ ├── Issue251.ts
│ ├── Issue252.ts
│ ├── Issue262.ts
│ ├── Issue264.tsx
│ ├── Issue276.ts
│ ├── Issue28.ts
│ ├── Issue280.tsx
│ ├── Issue283.tsx
│ ├── Issue285.ts
│ ├── Issue288.ts
│ ├── Issue292.ts
│ ├── Issue294.ts
│ ├── Issue3.ts
│ ├── Issue304.ts
│ ├── Issue305.ts
│ ├── Issue307.ts
│ ├── Issue314.ts
│ ├── Issue318.ts
│ ├── Issue32.ts
│ ├── Issue321.ts
│ ├── Issue322.ts
│ ├── Issue326.ts
│ ├── Issue334.ts
│ ├── Issue335.ts
│ ├── Issue337.ts
│ ├── Issue338.ts
│ ├── Issue339.ts
│ ├── Issue343.ts
│ ├── Issue344.tsx
│ ├── Issue346.ts
│ ├── Issue347.ts
│ ├── Issue351.tsx
│ ├── Issue356.ts
│ ├── Issue357.tsx
│ ├── Issue359.ts
│ ├── Issue36.ts
│ ├── Issue361.ts
│ ├── Issue365.ts
│ ├── Issue366.ts
│ ├── Issue368.ts
│ ├── Issue37.ts
│ ├── Issue375.ts
│ ├── Issue376.ts
│ ├── Issue377.ts
│ ├── Issue379.ts
│ ├── Issue380.ts
│ ├── Issue381.ts
│ ├── Issue382.ts
│ ├── Issue383.tsx
│ ├── Issue384.ts
│ ├── Issue387.ts
│ ├── Issue388.ts
│ ├── Issue389.ts
│ ├── Issue391.ts
│ ├── Issue393.ts
│ ├── Issue394.ts
│ ├── Issue396.ts
│ ├── Issue397.ts
│ ├── Issue398.ts
│ ├── Issue402.ts
│ ├── Issue403IncorrectlyDetectedArrowTypeParameters.ts
│ ├── Issue403IncorrectlyDetectedFunctionCallAsArrow.ts
│ ├── Issue405.ts
│ ├── Issue407.ts
│ ├── Issue408.ts
│ ├── Issue415.tsx
│ ├── Issue417.ts
│ ├── Issue418.ts
│ ├── Issue42.ts
│ ├── Issue420.ts
│ ├── Issue421.ts
│ ├── Issue423.ts
│ ├── Issue427.ts
│ ├── Issue428.ts
│ ├── Issue43.ts
│ ├── Issue430.tsx
│ ├── Issue431.ts
│ ├── Issue433.ts
│ ├── Issue434.ts
│ ├── Issue435.ts
│ ├── Issue44.ts
│ ├── Issue441.ts
│ ├── Issue444.ts
│ ├── Issue445.ts
│ ├── Issue450.ts
│ ├── Issue452.ts
│ ├── Issue453.ts
│ ├── Issue455.ts
│ ├── Issue458.ts
│ ├── Issue460.ts
│ ├── Issue461.tsx
│ ├── Issue463.ts
│ ├── Issue466.ts
│ ├── Issue468.ts
│ ├── Issue470.ts
│ ├── Issue471.ts
│ ├── Issue472.ts
│ ├── Issue476.ts
│ ├── Issue477.ts
│ ├── Issue478.tsx
│ ├── Issue480.ts
│ ├── Issue482.ts
│ ├── Issue484.ts
│ ├── Issue485.ts
│ ├── Issue486.ts
│ ├── Issue491.ts
│ ├── Issue496.ts
│ ├── Issue499.ts
│ ├── Issue5.ts
│ ├── Issue500.ts
│ ├── Issue502.ts
│ ├── Issue506.ts
│ ├── Issue510.ts
│ ├── Issue513.ts
│ ├── Issue515.ts
│ ├── Issue518.tsx
│ ├── Issue521.ts
│ ├── Issue522.ts
│ ├── Issue525.ts
│ ├── Issue526.ts
│ ├── Issue530.ts
│ ├── Issue531.ts
│ ├── Issue536.ts
│ ├── Issue538.ts
│ ├── Issue540.ts
│ ├── Issue543.ts
│ ├── Issue549.ts
│ ├── Issue550.ts
│ ├── Issue551.ts
│ ├── Issue554.ts
│ ├── Issue556.ts
│ ├── Issue558.ts
│ ├── Issue559.ts
│ ├── Issue562.ts
│ ├── Issue566.ts
│ ├── Issue567.ts
│ ├── Issue569.ts
│ ├── Issue571.ts
│ ├── Issue572.ts
│ ├── Issue572ForLoop.ts
│ ├── Issue575.ts
│ ├── Issue578.ts
│ ├── Issue579.ts
│ ├── Issue580.ts
│ ├── Issue581.ts
│ ├── Issue584.ts
│ ├── Issue585.tsx
│ ├── Issue586.ts
│ ├── Issue59.ts
│ ├── Issue590.ts
│ ├── Issue591.ts
│ ├── Issue592.ts
│ ├── Issue595.ts
│ ├── Issue598.ts
│ ├── Issue601.ts
│ ├── Issue602.ts
│ ├── Issue604.ts
│ ├── Issue605.ts
│ ├── Issue606.tsx
│ ├── Issue607.ts
│ ├── Issue608.ts
│ ├── Issue609.ts
│ ├── Issue610.ts
│ ├── Issue612.ts
│ ├── Issue613.ts
│ ├── Issue616.ts
│ ├── Issue62.ts
│ ├── Issue623.ts
│ ├── Issue624.tsx
│ ├── Issue625.ts
│ ├── Issue626.ts
│ ├── Issue628.ts
│ ├── Issue629.ts
│ ├── Issue63.ts
│ ├── Issue632.tsx
│ ├── Issue634.ts
│ ├── Issue635.ts
│ ├── Issue636.tsx
│ ├── Issue637.ts
│ ├── Issue637a.ts
│ ├── Issue637b.tsx
│ ├── Issue638.ts
│ ├── Issue639.ts
│ ├── Issue64.ts
│ ├── Issue642.ts
│ ├── Issue643.ts
│ ├── Issue646.ts
│ ├── Issue647.ts
│ ├── Issue65.ts
│ ├── Issue650.ts
│ ├── Issue651.ts
│ ├── Issue652.ts
│ ├── Issue653.ts
│ ├── Issue654.ts
│ ├── Issue66.tsx
│ ├── Issue661.ts
│ ├── Issue662.ts
│ ├── Issue663.ts
│ ├── Issue665.ts
│ ├── Issue666.ts
│ ├── Issue667.tsx
│ ├── Issue668.ts
│ ├── Issue670.ts
│ ├── Issue672.ts
│ ├── Issue673.ts
│ ├── Issue674.ts
│ ├── Issue675.ts
│ ├── Issue677.ts
│ ├── Issue677arrow.ts
│ ├── Issue683.ts
│ ├── Issue684.ts
│ ├── Issue685.ts
│ ├── Issue686.ts
│ ├── Issue687.ts
│ ├── Issue688.ts
│ ├── Issue689.ts
│ ├── Issue692.ts
│ ├── Issue695.ts
│ ├── Issue698.ts
│ ├── Issue701.ts
│ ├── Issue702.ts
│ ├── Issue711.ts
│ ├── Issue715.ts
│ ├── Issue717.ts
│ ├── Issue720.ts
│ ├── Issue721.ts
│ ├── Issue724.ts
│ ├── Issue727.ts
│ ├── Issue728.ts
│ ├── Issue730.ts
│ ├── Issue732.ts
│ ├── Issue737.ts
│ ├── Issue741.ts
│ ├── Issue743.ts
│ ├── Issue744.ts
│ ├── Issue748.ts
│ ├── Issue750.ts
│ ├── Issue751.ts
│ ├── Issue754.tsx
│ ├── Issue756.ts
│ ├── Issue760.ts
│ ├── Issue762.ts
│ ├── Issue763.ts
│ ├── Issue766.ts
│ ├── Issue77.ts
│ ├── Issue774.ts
│ ├── Issue780.ts
│ ├── Issue782.ts
│ ├── Issue785.ts
│ ├── Issue786.ts
│ ├── Issue787.ts
│ ├── Issue790.ts
│ ├── Issue791.ts
│ ├── Issue793.ts
│ ├── Issue794.tsx
│ ├── Issue796.ts
│ ├── Issue797.ts
│ ├── Issue811.tsx
│ ├── Issue816.ts
│ ├── Issue82.ts
│ ├── Issue822.ts
│ ├── Issue823.ts
│ ├── Issue832.ts
│ ├── Issue836.ts
│ ├── Issue840.ts
│ ├── Issue841.ts
│ ├── Issue844.ts
│ ├── Issue846.ts
│ ├── Issue850.ts
│ ├── Issue858.ts
│ ├── Issue868.ts
│ ├── Issue87.ts
│ ├── Issue870.ts
│ ├── Issue88.tsx
│ ├── Issue89.ts
│ ├── Issue90.ts
│ ├── Issue921.ts
│ ├── Issue923.ts
│ ├── Issue924.tsx
│ ├── Issue96.ts
│ ├── Issue964.ts
│ ├── Issue975.ts
│ ├── Issues573.ts
│ ├── Issues597.ts
│ ├── Issues648.tsx
│ ├── Issues649.tsx
│ ├── ParameterProperties.ts
│ ├── SyntacticallyIncorrectStrings.ts
│ ├── TsxSamples.tsx
│ ├── arbitraryModuleNamespaceIdentifiers.ts
│ ├── arrow.ts
│ ├── arrowInsideCall.ts
│ ├── assertions.ts
│ ├── autoAccessor.ts
│ ├── awaitColoring.ts
│ ├── awaitUsedInExpression.ts
│ ├── awaitUsing.ts
│ ├── awaited.ts
│ ├── bigint.ts
│ ├── binder.ts
│ ├── conditionalTypes.ts
│ ├── constType.ts
│ ├── constTypeAssert.ts
│ ├── constTypeParameter.ts
│ ├── constants.ts
│ ├── constructorType.ts
│ ├── destructuringWithDefaults.ts
│ ├── directives.ts
│ ├── docComments.ts
│ ├── enumMemberWithIntializer.ts
│ ├── enumMemberWithQuotedMemberName.ts
│ ├── exportDeclarations.ts
│ ├── forof.ts
│ ├── generator.ts
│ ├── genericTaggedTemplate.ts
│ ├── importAssert.ts
│ ├── importTypeOnly.ts
│ ├── importTypes.ts
│ ├── inferTypes.ts
│ ├── intrinsic.ts
│ ├── issue1005.ts
│ ├── issue327.ts
│ ├── issue522_1.ts
│ ├── issue534.tsx
│ ├── issue776.ts
│ ├── issue806.ts
│ ├── issue807.tsx
│ ├── issue807ts.ts
│ ├── issue809.ts
│ ├── issue812.ts
│ ├── issue814.ts
│ ├── issue824.ts
│ ├── issue907.ts
│ ├── issue909.ts
│ ├── issue916.ts
│ ├── issue927.ts
│ ├── issue930.ts
│ ├── issue932.ts
│ ├── issue935.ts
│ ├── issue940.ts
│ ├── issue948.ts
│ ├── issue949.ts
│ ├── issue951.ts
│ ├── issue957.ts
│ ├── issue971.ts
│ ├── javascript.ts
│ ├── javascriptClasses.ts
│ ├── jsdocProperty.ts
│ ├── jsdocType.ts
│ ├── jsxTagWithTypeArguments.tsx
│ ├── keyof.ts
│ ├── mappedType.ts
│ ├── modifierOperators.ts
│ ├── multilineArrow.ts
│ ├── multilineDestructuringParametersOfArrow.ts
│ ├── multineTag.tsx
│ ├── multipleVariableDeclaration.ts
│ ├── namedTuples.ts
│ ├── namespaceAndModule.ts
│ ├── notMultilineArrow1.ts
│ ├── notMultilineArrow2.ts
│ ├── notMultilineArrow3.ts
│ ├── numeric.ts
│ ├── numericAsType.ts
│ ├── objectLiteral.ts
│ ├── objectLiteralWithCast.ts
│ ├── objectType.ts
│ ├── optionalChaining.ts
│ ├── parameterBindingPattern.ts
│ ├── partialTypeArguments.ts
│ ├── pr48_noSemiColon.ts
│ ├── pr557_namespacedJsx.tsx
│ ├── privateFields.ts
│ ├── property.ts
│ ├── propertyNameInObjectBindingElement.ts
│ ├── readonly.ts
│ ├── readonlyModifier.ts
│ ├── regexp.ts
│ ├── resolutionMode.ts
│ ├── restAndSpreadExpression.ts
│ ├── restInBindingPattern.ts
│ ├── satisfies.ts
│ ├── specialNew.ts
│ ├── templateLiteralType.ts
│ ├── typeofClass.ts
│ ├── typeparameterDefault.ts
│ ├── using.ts
│ ├── variableBindingPattern.ts
│ └── varianceAnnotations.ts
├── test.ts
└── tsconfig.json
SYMBOL INDEX (685 symbols across 237 files)
FILE: build/build.ts
type Language (line 6) | enum Language {
type Extension (line 11) | enum Extension {
function file (line 18) | function file(language: Language, extension: Extension) {
function writePlistFile (line 22) | function writePlistFile(grammar: TmGrammar | TmTheme, fileName: string) {
function readYaml (line 27) | function readYaml(fileName: string) {
function changeTsToTsx (line 32) | function changeTsToTsx(str: string) {
function transformGrammarRule (line 36) | function transformGrammarRule(rule: any, propertyNames: string[], transf...
function transformGrammarRepository (line 52) | function transformGrammarRepository(grammar: TmGrammar, propertyNames: s...
function getTsxGrammar (line 59) | function getTsxGrammar() {
function getTsGrammar (line 98) | function getTsGrammar(getVariables: (tsGrammarVariables: MapLike<string>...
function replacePatternVariables (line 103) | function replacePatternVariables(pattern: string, variableReplacers: Var...
type VariableReplacer (line 111) | type VariableReplacer = [RegExp, string];
function updateGrammarVariables (line 112) | function updateGrammarVariables(grammar: TmGrammar, variables: MapLike<s...
function buildGrammar (line 128) | function buildGrammar() {
function changeTsToTsxTheme (line 139) | function changeTsToTsxTheme(theme: TmTheme) {
function buildTheme (line 158) | function buildTheme() {
FILE: build/index.d.ts
type MapLike (line 5) | interface MapLike<T> {
type TmGrammarRuleName (line 9) | interface TmGrammarRuleName {
type TmGrammarRule (line 13) | interface TmGrammarRule {
type TmGrammarMatchRule (line 16) | interface TmGrammarMatchRule extends TmGrammarRule {
type TmGrammarBeginEndRule (line 20) | interface TmGrammarBeginEndRule extends TmGrammarRule {
type TmGrammarIncludeRule (line 28) | interface TmGrammarIncludeRule extends TmGrammarRule {
type AnyTmGrammarRule (line 31) | type AnyTmGrammarRule = TmGrammarMatchRule | TmGrammarBeginEndRule | TmG...
type TmGrammarRepositoryPatterns (line 32) | interface TmGrammarRepositoryPatterns {
type TmGrammarRepositaryRule (line 35) | type TmGrammarRepositaryRule = AnyTmGrammarRule | TmGrammarRepositoryPat...
type TmGrammar (line 36) | interface TmGrammar {
type TmThemeSetting (line 46) | interface TmThemeSetting {
type TmTheme (line 50) | interface TmTheme {
FILE: tests/build.ts
type GrammarKind (line 6) | enum GrammarKind {
function grammarPath (line 14) | function grammarPath(kind: GrammarKind) {
method createOnigScanner (line 25) | createOnigScanner(patterns) { return new oniguruma.OnigScanner(patterns); }
method createOnigString (line 26) | createOnigString(s) { return new oniguruma.OnigString(s); }
type ThenableGrammar (line 51) | interface ThenableGrammar {
function thenableGrammar (line 55) | function thenableGrammar(kind: GrammarKind): ThenableGrammar {
function getInputFile (line 61) | function getInputFile(oriLines: string[]): string {
function getGrammarInfo (line 67) | function getGrammarInfo(kind: GrammarKind) {
type Grammar (line 71) | interface Grammar {
function initGrammar (line 76) | function initGrammar(kind: GrammarKind, grammar: vt.IGrammar): Grammar {
function tokenizeLine (line 80) | function tokenizeLine(grammar: Grammar, line: string) {
function hasDiff (line 86) | function hasDiff<T>(first: T[], second: T[], hasDiffT: (first: T, second...
function makeTsScope (line 100) | function makeTsScope(scope: string) {
function hasDiffScope (line 104) | function hasDiffScope(first: string, second: string) {
function hasDiffLineToken (line 108) | function hasDiffLineToken(first: vt.IToken, second: vt.IToken) {
function getBaseline (line 114) | function getBaseline(grammar: Grammar, outputLines: string[]) {
function generateScopes (line 118) | function generateScopes(text: string, parsedFileName: path.ParsedPath) {
function validateTokenScopeExtension (line 137) | function validateTokenScopeExtension(grammar: Grammar, token: vt.IToken) {
function isValidScopeExtension (line 141) | function isValidScopeExtension(grammar: Grammar, scope: string) {
function generateScopesWorker (line 147) | function generateScopesWorker(mainGrammar: Grammar, otherGrammar: Gramma...
function writeTokenLine (line 182) | function writeTokenLine(grammar: Grammar, token: vt.IToken, outputLines:...
FILE: tests/cases/Abstracts.ts
method yearsLeft (line 3) | public yearsLeft() { return 20 - this.age; }
class Cow (line 7) | class Cow extends Animal {
method makeSound (line 8) | makeSound() { return "Moo"; }
class Cat (line 11) | class Cat extends Animal {
method makeSound (line 12) | makeSound() { return "Meow"; }
FILE: tests/cases/ArrowFunctionInsideTypeAssertion.ts
function f (line 13) | function f(x: string | ((value: string) => number)) {
FILE: tests/cases/Comments.ts
type i (line 24) | interface i extends i1, i2, i3 {}
type i (line 25) | interface /**/ i extends i1, i2, i3 {}
type i (line 26) | interface i /**/ extends i1, i2, i3 {}
type i (line 27) | interface i extends /**/ i1, i2, i3 {}
type i (line 28) | interface i extends i1 /**/, i2, i3 {}
type i (line 29) | interface i extends i1, /**/ i2, i3 {}
type i (line 30) | interface i extends i1, i2 /**/, i3 {}
type i (line 31) | interface i extends i1, i2, /**/ i3 {}
type i (line 32) | interface i extends i1, i2, i3 /**/ {}
type i (line 33) | interface /**/ i /**/ extends /**/ i1, /**/ i2, /**/ i3 /**/ {}
type i (line 34) | interface /**/ i /**/ extends /**/ i1 /**/ , /**/ i2 /**/ , /**/ i3 /**/ {}
class i (line 36) | class i extends c1,c2,c3{}
class i (line 37) | class/**/i extends c1,c2,c3{}
class i (line 38) | class i/**/extends c1,c2,c3{}
class i (line 39) | class i extends/**/c1,c2,c3{}
class i (line 40) | class i extends c1/**/,c2,c3{}
class i (line 41) | class i extends c1,/**/c2,c3{}
class i (line 42) | class i extends c1,c2/**/,c3{}
class i (line 43) | class i extends c1,c2,/**/c3{}
class i (line 44) | class i extends c1,c2,c3/**/{}
class i (line 45) | class/**/i/**/extends/**/c1,/**/c2,/**/c3/**/{}
class i (line 46) | class/**/i/**/extends/**/c1/**/,/**/c2/**/,/**/c3/**/{}
type KeyValuePair (line 48) | interface KeyValuePair/**/<K, V> extends Array<K | V> { 0: K; 1: V; }
type KeyValuePair (line 49) | interface KeyValuePair<K, V>/**/extends Array<K | V> { 0: K; 1: V; }
type KeyValuePair (line 50) | interface KeyValuePair<K, V> extends/**/Array<K | V> { 0: K; 1: V; }
type KeyValuePair (line 51) | interface KeyValuePair<K, V> extends Array/**/<K | V> { 0: K; 1: V; }
type KeyValuePair (line 52) | interface KeyValuePair<K, V> extends Array<K | V>/**/{ 0: K; 1: V; }
type G (line 54) | interface G/**/<extends_, _extends extends Function> {
type G (line 57) | interface G<extends_, _extends/**/extends Function> {
type G (line 60) | interface G<extends_, _extends extends/**/Function> {
FILE: tests/cases/FunctionMethodOverloads.ts
function testFunctionOverload (line 7) | function testFunctionOverload(p: any): new() => any {
function testFunctionOverloadWithSemicolon (line 16) | function testFunctionOverloadWithSemicolon(p: any): new () => any {
class testClass (line 21) | class testClass {
method testMethodOverload (line 28) | public testMethodOverload(p: any): new() => any {
method testMethodOverloadWithSemicolon (line 37) | public testMethodOverloadWithSemicolon(p: any): new () => any {
type I (line 42) | interface I {
FILE: tests/cases/FunctionMethodParameters.ts
function testFunctionParamType (line 2) | function testFunctionParamType(
class testClass (line 16) | class testClass {
method testMethodParamType (line 18) | public testMethodParamType(
FILE: tests/cases/FunctionMethodReturnTypes.ts
function testFunctionReturnType1 (line 2) | function testFunctionReturnType1(): string [] { return [""] }
function testFunctionReturnType2 (line 3) | function testFunctionReturnType2(): {} { return {} }
function testFunctionReturnType3 (line 4) | function testFunctionReturnType3(): {a: A, b: B} { return {a: {m: "" }, ...
function testFunctionReturnType4 (line 5) | function testFunctionReturnType4(): [number, number] { return [1, 1] }
function testFunctionReturnType5 (line 6) | function testFunctionReturnType5(): Array<A> { return [{ m: "" }] }
function testFunctionReturnType6 (line 7) | function testFunctionReturnType6(): new () => number { throw new Error("...
function testFunctionReturnType7 (line 8) | function testFunctionReturnType7(): (() => number) { throw new Error(""); }
function testFunctionReturnType8 (line 9) | function testFunctionReturnType8(): (() => number) [] { throw new Error(...
function testFunctionReturnType9 (line 10) | function testFunctionReturnType9(): (() => number) | (() => string) { th...
function testFunctionReturnType10 (line 11) | function testFunctionReturnType10(): {a: A, b: B} [] { return [{a: {m: "...
function testFunctionReturnType11 (line 12) | function testFunctionReturnType11(): number | string { return 1 }
function testFunctionReturnType12 (line 13) | function testFunctionReturnType12(): number | string [] { return }
function testFunctionReturnType13 (line 14) | function testFunctionReturnType13(): [number, number] | string [] { retu...
class TestClass (line 16) | class TestClass {
method testMethodReturnType1 (line 18) | public testMethodReturnType1(): string [] { return [""] }
method testMethodReturnType2 (line 19) | public testMethodReturnType2(): {} { return {} }
method testMethodReturnType3 (line 20) | public testMethodReturnType3(): {a: A, b: B} { return {a: {m: "" }, b:...
method testMethodReturnType4 (line 21) | public testMethodReturnType4(): [number, number] { return [1, 1] }
method testMethodReturnType5 (line 22) | public testMethodReturnType5(): Array<A> { return [{ m: "" }] }
method testMethodReturnType6 (line 23) | public testMethodReturnType6(): new () => number { throw new Error(""); }
method testMethodReturnType7 (line 24) | public testMethodReturnType7(): (() => number) { throw new Error(""); }
method testMethodReturnType8 (line 25) | public testMethodReturnType8(): (() => number) [] { throw new Error(""...
method testMethodReturnType9 (line 26) | public testMethodReturnType9(): (() => number) | (() => string) { thro...
method testMethodReturnType10 (line 27) | public testMethodReturnType10(): {a: A, b: B} [] { return [{a: {m: "" ...
method testMethodReturnType11 (line 28) | public testMethodReturnType11(): number | string { return 1 }
method testMethodReturnType12 (line 29) | public testMethodReturnType12(): number | string [] { return }
method testMethodReturnType13 (line 30) | public testMethodReturnType13(): [number, number] | string [] { return...
FILE: tests/cases/Issue10.ts
type Hello (line 1) | enum Hello {
class World (line 6) | class World {
method normal (line 7) | normal() {
method [Hello.A] (line 12) | [Hello.A]() {
FILE: tests/cases/Issue114.ts
type BreakpointType (line 1) | type BreakpointType = 'line' | 'call' | 'return' | 'exception' | 'condit...
type Test (line 2) | interface Test {
FILE: tests/cases/Issue115.ts
class Foo (line 1) | class Foo {
method bar (line 2) | bar(a: Foo, b: string) { }
function foo (line 5) | function foo(a: Foo, b: string) { }
method bar (line 12) | bar(a: Foo, b: string) { }
method bar2 (line 13) | set bar2(x: string) { }
FILE: tests/cases/Issue119.ts
class x (line 1) | class x {
method SomeMethod (line 2) | public SomeMethod() {
method OtherMethod (line 4) | public OtherMethod() { }
FILE: tests/cases/Issue133.ts
type I (line 1) | interface I {
FILE: tests/cases/Issue142.ts
class x (line 1) | class x {
FILE: tests/cases/Issue143.ts
class CountClicks (line 3) | @Directive({selector: 'button[counting]'})
method onClick (line 6) | onClick(btn) {
class AppComponent (line 15) | class AppComponent {
method constructor (line 16) | constructor() { console.clear(); }
FILE: tests/cases/Issue146.ts
function foo (line 1) | function foo() {
FILE: tests/cases/Issue148.ts
class Test (line 1) | class Test {
method constructor (line 2) | constructor(
FILE: tests/cases/Issue149.ts
function fn (line 4) | function fn(s: any) {
function fn (line 11) | function fn(s: any) {
FILE: tests/cases/Issue153.ts
class Matrix (line 9) | class Matrix {
method getColumn_Breaks (line 27) | public getColumn_Breaks(index : number) : Vector3 {
method getColumn_Works (line 45) | public getColumn_Works(index : number) : Vector {
FILE: tests/cases/Issue154.ts
class TestCase (line 1) | class TestCase {
method ['foo'] (line 2) | ['foo']() {
class TestCase2 (line 7) | class TestCase2 {
method foo (line 8) | foo() {
FILE: tests/cases/Issue156.ts
class Test (line 1) | class Test {
method mmm (line 2) | mmm(p1: string | {}, p2: string)
FILE: tests/cases/Issue158.ts
class Test (line 1) | class Test
method constructor (line 3) | public constructor()
method doSomething (line 10) | private doSomething()
FILE: tests/cases/Issue163.ts
method f (line 2) | async f() {
FILE: tests/cases/Issue166.ts
type x (line 1) | type x = string | "aaa" | "bbb" | "ccc" | number;
type x1 (line 2) | type x1 = string |
type x2 (line 5) | type x2 = string | /*comment*/ "aaa" | "bbb" | "ccc" | number;
type x3 (line 6) | type x3 = string | "aaa" | //comment
FILE: tests/cases/Issue171.ts
class c (line 1) | class c {
function foo (line 16) | function foo() {
FILE: tests/cases/Issue183.ts
class Sample2 (line 1) | class Sample2
method constructor (line 3) | constructor()
method method1 (line 11) | public method1(): void
method method2 (line 14) | private method2 () : number
method method3 (line 18) | method3 () : string
FILE: tests/cases/Issue186.ts
function myFunction (line 1) | function myFunction(param1, param2, number, string, boolean) {
FILE: tests/cases/Issue191.ts
class Thing (line 1) | class Thing {
method constructor (line 2) | constructor(public content: string){
method constructor (line 12) | constructor(public content: string){
class Thing (line 11) | class Thing<T, U> {
method constructor (line 2) | constructor(public content: string){
method constructor (line 12) | constructor(public content: string){
FILE: tests/cases/Issue193.ts
function Main_Функция (line 1) | function Main_Функция(s: string)
function Функция_Main (line 5) | function Функция_Main(s: string)
FILE: tests/cases/Issue197.ts
class sampleClass (line 1) | class sampleClass {
FILE: tests/cases/Issue202.tsx
type Test (line 1) | interface Test<T> {
type Props (line 5) | interface Props {
class Whatever (line 9) | class Whatever {
FILE: tests/cases/Issue206.ts
type A (line 1) | interface A {}
type B (line 2) | interface B {}
type C (line 3) | interface C {}
type D (line 5) | type D = A | B | C
type D1 (line 6) | type D1 = A
type D3 (line 9) | type D3 =
type D2 (line 13) | type D2
type E (line 18) | type E = 'e1' | 'e2' | 'e3'
type E1 (line 19) | type E1 = 'e1'
type E2 (line 22) | type E2 =
type E3 (line 26) | type E3
type F (line 31) | type F = A & B & C
type F1 (line 32) | type F1 = A
type F2 (line 35) | type F2 =
type F3 (line 39) | type F3
FILE: tests/cases/Issue208.ts
class MyClass (line 4) | class MyClass {
FILE: tests/cases/Issue215.ts
function test (line 1) | function test() {
FILE: tests/cases/Issue216.ts
class MyType (line 1) | class MyType
FILE: tests/cases/Issue217.ts
class StatusSelector (line 1) | class StatusSelector {
class StatusSelector2 (line 6) | class StatusSelector2 {
FILE: tests/cases/Issue218.ts
class A (line 1) | class A {
method foo (line 2) | foo(a, b) {
method [foo] (line 4) | [foo](a, b) {
FILE: tests/cases/Issue221.ts
class syntaxHighlightBug (line 1) | class syntaxHighlightBug {
method wronglyHighlitedCode (line 6) | public wronglyHighlitedCode() {
FILE: tests/cases/Issue226.ts
function x (line 1) | async function x() {
FILE: tests/cases/Issue235.ts
class A (line 1) | class A {
method get (line 3) | get(q: Request, s: Response): void {
FILE: tests/cases/Issue236.ts
class Test (line 1) | class Test {
method before (line 2) | public before() {
method after (line 10) | public after() {
method [Symbol.iterator] (line 6) | public [Symbol.iterator]() {
FILE: tests/cases/Issue237.ts
type Test (line 1) | type Test = string // wrong comment color
FILE: tests/cases/Issue241.ts
function f (line 1) | function f(): () => number {
function foo (line 4) | function foo(): [number, () => number] {
function f (line 7) | function f(): () => number {
function f2 (line 10) | function f2(): () => {x: number }{
function foo2 (line 13) | function foo2(): [number, () => { x: number }] {
FILE: tests/cases/Issue247.tsx
class Test (line 1) | @dec<{}>()
FILE: tests/cases/Issue248.ts
class C1 (line 1) | class C1 {
method s1 (line 3) | static s1() {
class C2 (line 7) | class C2 {
method s1 (line 9) | static s1() {
class C3 (line 13) | class C3 {
method s1 (line 15) | static s1() {
class C4 (line 19) | class C4 {
method s1 (line 21) | static s1() {
class C5 (line 25) | class C5 {
method s1 (line 27) | static s1() {
class C6 (line 31) | class C6 {
method s1 (line 33) | static s1() {
FILE: tests/cases/Issue249.ts
function selectDictionary (line 5) | function selectDictionary(dictionaries: StoredDictionaries, lang:string) {
FILE: tests/cases/Issue250.ts
class FormType (line 2) | class FormType extends Type {
FILE: tests/cases/Issue252.ts
function getPage (line 1) | function getPage(p, base) {
FILE: tests/cases/Issue276.ts
function test (line 6) | function test(value: string, arrayValue: string[], optionalValue?: strin...
FILE: tests/cases/Issue280.tsx
class c (line 2) | class c {
method renderForecastsTable (line 3) | private renderForecastsTable() {
FILE: tests/cases/Issue283.tsx
class Home (line 4) | class Home extends React.Component<any, void> {
method render (line 5) | public render() {
FILE: tests/cases/Issue288.ts
function Name (line 4) | function Name(){
function eName (line 9) | function eName(){
FILE: tests/cases/Issue304.ts
method onchange (line 7) | onchange(next: EditorSDtate): void { dispatch(actions) }
FILE: tests/cases/Issue305.ts
method constructor (line 3) | constructor(protected wire: Transport, protected token?: string, readonl...
FILE: tests/cases/Issue307.ts
class Test (line 1) | class Test {
method method (line 2) | method() {
FILE: tests/cases/Issue32.ts
type NewInterface (line 5) | interface NewInterface{
class NewClass (line 11) | class NewClass implements NewInterface {
method setVal (line 13) | setVal(d: Data){
method constructor (line 16) | constructor(m: number, n: string){}
FILE: tests/cases/Issue321.ts
method getChildren (line 2) | public getChildren(debugService: debug.IDebugService): TPromise<debug.IE...
FILE: tests/cases/Issue322.ts
type TokenType (line 1) | enum TokenType {
FILE: tests/cases/Issue326.ts
class Bar (line 1) | class Bar extends getFoo("baz") {}
FILE: tests/cases/Issue335.ts
class A1 (line 1) | class A1 {
method b (line 2) | b() {
method c (line 7) | private static c() {
class A2 (line 11) | class A2 {
method b (line 12) | b() {
method c (line 17) | private static c() {
class A3 (line 21) | class A3 {
method b (line 22) | b() {
method c (line 33) | private static c() {
class A4 (line 37) | class A4 {
method b (line 38) | b() {
method c (line 49) | private static c() {
FILE: tests/cases/Issue339.ts
function f (line 1) | function f() {
FILE: tests/cases/Issue344.tsx
type egGenericsInArray (line 3) | interface egGenericsInArray {
FILE: tests/cases/Issue346.ts
function f (line 1) | function f()
FILE: tests/cases/Issue347.ts
class Foo (line 7) | class Foo extends React.Component {
method render (line 8) | render() {
FILE: tests/cases/Issue356.ts
function formatBigNum (line 1) | function formatBigNum(num) {
FILE: tests/cases/Issue36.ts
method hello (line 2) | hello() {
FILE: tests/cases/Issue365.ts
class Renamer (line 1) | class Renamer {
method constructor (line 2) | constructor (private readonly srcName: string, private readonly target...
FILE: tests/cases/Issue368.ts
constant CREDIT_CARD (line 2) | const CREDIT_CARD = 'CC';
FILE: tests/cases/Issue37.ts
class class1 (line 9) | class class1(){
method functioname (line 10) | static functioname(){
class className (line 15) | class className(){
function myFun (line 36) | function myFun(x: number) {
type I (line 47) | interface I {}
class Cell (line 52) | class Cell {
method constructor (line 55) | constructor(parent: Cell) {
FILE: tests/cases/Issue375.ts
class Foo (line 2) | class Foo {
method constructor (line 3) | constructor(public x: string) {}
FILE: tests/cases/Issue376.ts
type Itest (line 1) | interface Itest {
FILE: tests/cases/Issue379.ts
type A (line 1) | interface A {
FILE: tests/cases/Issue381.ts
class Foo (line 1) | class Foo{
method constructor (line 2) | constructor(){
method test (line 5) | test(){
method noColorSyntax (line 8) | noColorSyntax(){
FILE: tests/cases/Issue382.ts
class ConstrainedBasedObjectcolection (line 2) | class ConstrainedBasedObjectcolection<T extends Core.Model.DataEntity>
method GetState (line 4) | public GetState(): { [index : string]: string }
FILE: tests/cases/Issue387.ts
function input (line 29) | async function input ( message = '' ) {
FILE: tests/cases/Issue393.ts
class ColorsBars (line 1) | class ColorsBars extends React.Component {
method constructor (line 2) | constructor(...args) {
FILE: tests/cases/Issue405.ts
function myFunction1 (line 1) | function myFunction1
function myFunction2 (line 8) | function myFunction2
FILE: tests/cases/Issue418.ts
function merge (line 1) | function merge(as, bs) {
function mergesort (line 15) | function mergesort(array) {
FILE: tests/cases/Issue421.ts
function f (line 1) | function f(
FILE: tests/cases/Issue423.ts
type Foo (line 1) | interface Foo {
type T (line 5) | type T = Foo;
type Bar (line 6) | interface Bar {
FILE: tests/cases/Issue427.ts
function a (line 1) | function a(): { [key: string]: number } | { [key: string]: number } { th...
function b (line 3) | function b(a: { [key: string]: number } | { [key: string]: number }): vo...
FILE: tests/cases/Issue428.ts
function funct (line 8) | function funct
FILE: tests/cases/Issue430.tsx
class c (line 2) | class c {
method render (line 3) | render() {
FILE: tests/cases/Issue431.ts
function otherFunc (line 4) | function otherFunc() {} // <-- Not highlighted.
FILE: tests/cases/Issue433.ts
type Z (line 2) | interface Z {}
FILE: tests/cases/Issue434.ts
class SomeClass (line 1) | class SomeClass {
method someMethod (line 2) | private someMethod(): void {
method someOtherMethod (line 12) | private someOtherMethod() {
FILE: tests/cases/Issue44.ts
type TestInterface (line 2) | interface TestInterface {
FILE: tests/cases/Issue445.ts
function myAwesomeFunction (line 5) | function myAwesomeFunction(object) {
FILE: tests/cases/Issue452.ts
class Test (line 1) | class Test<A, B>{}
class Favorite (line 2) | class Favorite extends Test<
FILE: tests/cases/Issue453.ts
type Resolve (line 1) | type Resolve = () => number;
class Test (line 3) | class Test {
method first (line 4) | first(values: Map<string, Resolve>): number {
method second (line 8) | second(): string {
FILE: tests/cases/Issue458.ts
class Blah (line 1) | class Blah {
method get (line 2) | get () {}
method get (line 5) | get () {}
FILE: tests/cases/Issue461.tsx
class Foo (line 2) | class Foo {
method render (line 6) | render () {
FILE: tests/cases/Issue466.ts
function foo (line 1) | function foo(this: number, x: number) {
FILE: tests/cases/Issue471.ts
function syntaxHighlightingIsBroken (line 4) | function syntaxHighlightingIsBroken() {
FILE: tests/cases/Issue472.ts
type I (line 1) | interface I {
FILE: tests/cases/Issue476.ts
class Bug (line 1) | class Bug {
method asdf (line 2) | static asdf(o, o2) {
FILE: tests/cases/Issue477.ts
method fn4 (line 6) | * fn4() {}
method fn5 (line 7) | *fn5() {}
class Bar (line 13) | class Bar {
method fn9 (line 14) | * fn9() {}
method fn10 (line 15) | *fn10() {}
FILE: tests/cases/Issue480.ts
type Pattern (line 2) | interface Pattern {
type Pattern2 (line 8) | interface Pattern2 {
FILE: tests/cases/Issue484.ts
type Foo (line 4) | interface Foo {
FILE: tests/cases/Issue502.ts
class Foo (line 1) | class Foo {
method bar (line 2) | bar () {
FILE: tests/cases/Issue526.ts
class A (line 4) | class A extends B {
FILE: tests/cases/Issue530.ts
function getStats (line 1) | function getStats() {
FILE: tests/cases/Issue531.ts
class Test (line 1) | class Test { }
FILE: tests/cases/Issue549.ts
function foo (line 1) | function foo(x, y){
FILE: tests/cases/Issue551.ts
class a (line 1) | class a extends b, c {
class a2 (line 3) | class a2 extends b, c
FILE: tests/cases/Issue556.ts
class Thing (line 1) | class Thing {
FILE: tests/cases/Issue559.ts
class MyClass (line 3) | class MyClass {
FILE: tests/cases/Issue562.ts
function foo (line 4) | function foo() {
FILE: tests/cases/Issue566.ts
constant COULOMB (line 1) | const COULOMB = 8.957_551_787e9;
constant PLANCK (line 2) | const PLANCK = 6.626_070_040e-34;
constant JENNY (line 3) | const JENNY = 867_5309;
FILE: tests/cases/Issue567.ts
function t (line 1) | function t(){
FILE: tests/cases/Issue571.ts
method ["a" +
"b"] (line 2) | ["a" +
method 'a\
' (line 6) | 'a\
FILE: tests/cases/Issue575.ts
function runQuery (line 1) | function runQuery() {
FILE: tests/cases/Issue579.ts
function f (line 1) | function f(): (x: number) => any {
FILE: tests/cases/Issue581.ts
type Foo (line 1) | interface Foo {
FILE: tests/cases/Issue59.ts
class A (line 1) | class A {
FILE: tests/cases/Issue592.ts
function test (line 1) | function test() {
FILE: tests/cases/Issue595.ts
function f (line 1) | function f() {
FILE: tests/cases/Issue604.ts
method 1 (line 2) | get 1() {
FILE: tests/cases/Issue605.ts
type Foo (line 1) | interface Foo {
type Foo2 (line 5) | interface Foo2 {
FILE: tests/cases/Issue609.ts
function Date (line 2) | function Date(...args) {
FILE: tests/cases/Issue610.ts
class Test (line 1) | class Test {
method constructor (line 2) | constructor() {
FILE: tests/cases/Issue612.ts
class C (line 1) | class C {
FILE: tests/cases/Issue613.ts
type I (line 1) | interface I {
FILE: tests/cases/Issue629.ts
class c (line 1) | class c {
method _forEachCell (line 2) | private _forEachCell(
FILE: tests/cases/Issue63.ts
type Callback (line 1) | type Callback <T> = (error: Error, value: T) => any
type Callback (line 3) | type Callback<T > = (error: Error, value: T) => any
type Callback (line 5) | type Callback = (error: Error, value: T) => any
type Foo (line 9) | type Foo <T > = {
FILE: tests/cases/Issue636.tsx
class Baz (line 2) | class Baz { }
class F (line 4) | class F {
method foo (line 5) | public *foo() {
method fuu (line 9) | public fuu() {
FILE: tests/cases/Issue637.ts
type I (line 1) | interface I {}
FILE: tests/cases/Issue642.ts
class TestClient (line 1) | class TestClient {
FILE: tests/cases/Issue643.ts
class TestClient (line 1) | class TestClient {
FILE: tests/cases/Issue647.ts
function doesSomething2 (line 1) | function doesSomething2(value: number) {
FILE: tests/cases/Issue65.ts
class Foo (line 1) | class Foo() {
method something (line 2) | get something(): any/*Something*/ {
method foo (line 6) | foo() {
FILE: tests/cases/Issue650.ts
class MyClass (line 1) | class MyClass{
FILE: tests/cases/Issue651.ts
type DagEdge (line 1) | interface DagEdge {
FILE: tests/cases/Issue653.ts
type IFoo (line 1) | interface IFoo {
FILE: tests/cases/Issue66.tsx
class Thing (line 4) | class Thing {
method render (line 5) | render() {
FILE: tests/cases/Issue661.ts
class TestColor (line 12) | class TestColor extends Foo {
method init (line 13) | public init() {}
FILE: tests/cases/Issue662.ts
class C (line 12) | class C {}
function f (line 13) | function f() {}
FILE: tests/cases/Issue663.ts
function foo (line 3) | function foo(bar?: string): void
FILE: tests/cases/Issue668.ts
class c (line 1) | class c {
FILE: tests/cases/Issue672.ts
function computed (line 1) | function computed<K extends string | symbol>(...watchedProps: K[]) {
FILE: tests/cases/Issue673.ts
function abc2 (line 3) | function abc2() { }
FILE: tests/cases/Issue675.ts
type T (line 1) | type T = { a: number } & ({ b: number })
FILE: tests/cases/Issue677.ts
function main (line 1) | function main(url: string)
FILE: tests/cases/Issue684.ts
function f (line 2) | function f(p: string) {
FILE: tests/cases/Issue687.ts
type ObjectAllocator (line 1) | interface ObjectAllocator {
FILE: tests/cases/Issue692.ts
function isInOpenInterval (line 1) | function isInOpenInterval(start: number, end: number) {
function isInClosedInterval (line 4) | function isInClosedInterval(start: number, end: number) {
FILE: tests/cases/Issue695.ts
type bindActionsToPayloadReturns (line 1) | type bindActionsToPayloadReturns = <A, M extends ActionCreatorsMapObject...
FILE: tests/cases/Issue701.ts
class Cl (line 1) | class Cl {
FILE: tests/cases/Issue715.ts
type TestCafeFactory (line 1) | interface TestCafeFactory {
FILE: tests/cases/Issue717.ts
function test (line 2) | function test() {
FILE: tests/cases/Issue720.ts
class Bar (line 1) | class Bar {
FILE: tests/cases/Issue721.ts
class Foo (line 1) | class Foo {
FILE: tests/cases/Issue724.ts
class C (line 1) | class C {
method a (line 3) | a(){return false}
method b (line 4) | b(){return false}
method Works (line 6) | Works(){
FILE: tests/cases/Issue732.ts
function validateEmail (line 1) | function validateEmail(e) {
FILE: tests/cases/Issue737.ts
function foo (line 1) | function foo() {
FILE: tests/cases/Issue741.ts
class CategoriesComponent (line 1) | class CategoriesComponent {
method x (line 2) | x() {
method checkCompanyRole (line 6) | private checkCompanyRole() {
FILE: tests/cases/Issue743.ts
type Test (line 1) | type Test = {
FILE: tests/cases/Issue744.ts
type Foo (line 1) | interface Foo {
type Foo2 (line 6) | interface Foo2 {
FILE: tests/cases/Issue748.ts
type X (line 2) | type X = A | B;
type A (line 3) | type A = string;
type B (line 4) | type B = number;
function foo (line 5) | function foo<T extends X>(arg: T): T extends B ? number : string {
FILE: tests/cases/Issue763.ts
type SomeInterface (line 1) | interface SomeInterface {
FILE: tests/cases/Issue77.ts
function foo (line 8) | function foo():{a: string} { }
function foo (line 14) | function foo() { }
FILE: tests/cases/Issue774.ts
type Level (line 10) | type Level = keyof typeof Levels
FILE: tests/cases/Issue785.ts
function getFoo (line 1) | function getFoo() { return <T, P>(t: T) => {t}}
function hello (line 11) | function hello() {
type Bar (line 15) | interface Bar {
FILE: tests/cases/Issue791.ts
function test3 (line 8) | function test3(foo, bar) {
function test4 (line 11) | function test4(
FILE: tests/cases/Issue797.ts
class Foo (line 1) | class Foo {
FILE: tests/cases/Issue82.ts
class Foo (line 1) | class Foo {
method constructor (line 2) | constructor(
FILE: tests/cases/Issue823.ts
function test (line 1) | function test(type, obj) {
FILE: tests/cases/Issue840.ts
type Union (line 1) | type Union<A,B> = A|B;
FILE: tests/cases/Issue841.ts
type Foo (line 1) | type Foo = string
FILE: tests/cases/Issue846.ts
function foo (line 1) | function foo(): number { return 42; }
FILE: tests/cases/Issue858.ts
class Foo (line 1) | class Foo {
method bar (line 2) | bar(): typeof Baz {
class X (line 9) | class X {
method constructor (line 10) | constructor() {
method foo (line 13) | public foo() { }
type Foo (line 16) | type Foo = { [K in keyof typeof foo & keyof typeof bar]: 1 };
method bar (line 2) | bar(): typeof Baz {
method bar (line 18) | get bar(): typeof foo['leet'] {
FILE: tests/cases/Issue868.ts
class Foo (line 1) | class Foo {
method bar (line 2) | override bar() { }
FILE: tests/cases/Issue870.ts
type Test (line 2) | type Test<A> = {
FILE: tests/cases/Issue88.tsx
function foo (line 2) | function foo() {
FILE: tests/cases/Issue89.ts
class A (line 1) | class A extends /* */B implements/**/ C{
FILE: tests/cases/Issue96.ts
type E (line 9) | const enum E { }
FILE: tests/cases/Issue964.ts
method foo (line 2) | foo():{}{
function baz (line 11) | function baz():{}{
FILE: tests/cases/Issues573.ts
class Foo (line 1) | class Foo {
method a (line 2) | static a(): void {
method b (line 6) | static b(): void {
FILE: tests/cases/ParameterProperties.ts
class A (line 1) | class A {
method constructor (line 2) | constructor(private a: string, protected b: string, public c: string) {
method foo (line 4) | foo() {
FILE: tests/cases/SyntacticallyIncorrectStrings.ts
class SomeClass (line 3) | class SomeClass {
FILE: tests/cases/TsxSamples.tsx
class MyComponent (line 2) | class MyComponent extends React.Component<Props, State>{
method render (line 3) | render() {
FILE: tests/cases/arrow.ts
class C (line 3) | class C {
function foo (line 5) | function foo() {
FILE: tests/cases/assertions.ts
class Test (line 15) | class Test {
method assert (line 16) | assert(value: unknown): asserts value {
method isTest2 (line 20) | isTest2(): this is Test2 {
method assertIsTest2 (line 23) | assertIsTest2(): asserts this is Test2 {
method assertThis (line 27) | assertThis(): asserts this {
method bar (line 31) | bar() {
method foo (line 35) | foo(x: unknown) {
FILE: tests/cases/autoAccessor.ts
class C (line 1) | class C {
FILE: tests/cases/awaited.ts
function f7 (line 3) | function f7<U>() {
FILE: tests/cases/binder.ts
function createBinder (line 1) | function createBinder(): (file: SourceFile, options: CompilerOptions) =>...
FILE: tests/cases/conditionalTypes.ts
type Diff1 (line 1) | type Diff1<T, U> = T extends U ? never : T
type TypeName (line 2) | type TypeName<T> =
type Extracted (line 9) | type Extracted<Struct> = {
FILE: tests/cases/constTypeAssert.ts
method foo (line 2) | foo() { this.x = 20 }
FILE: tests/cases/constTypeParameter.ts
class C1 (line 8) | class C1<const T> {
method constructor (line 9) | constructor(x: T) {}
method foo (line 10) | foo<const U>(x: U) { return x; }
type I1 (line 15) | interface I1<const T> { x: T }
type I2 (line 16) | interface I2 {
type T1 (line 19) | type T1<const T> = T;
type T2 (line 20) | type T2 = <const T>(x: T) => T;
type T3 (line 21) | type T3 = { <const T>(x: T): T };
type T4 (line 22) | type T4 = new <const T>(x: T) => T;
type T5 (line 23) | type T5 = { new <const T>(x: T): T };
function set (line 24) | function set<T, const P extends readonly string[]>(obj: T, path: P, valu...
FILE: tests/cases/constructorType.ts
type constructorType (line 1) | type constructorType<T> = new <T>(a: T) => T;
type abstractConstructorType (line 2) | type abstractConstructorType<T> = abstract new <T>(a: T) => T;
FILE: tests/cases/destructuringWithDefaults.ts
type IOptions (line 1) | interface IOptions {
function sync (line 11) | function sync({
function sync2 (line 23) | function sync2([
FILE: tests/cases/docComments.ts
function foo (line 7) | function foo(param1: string, param2: number) {
FILE: tests/cases/enumMemberWithIntializer.ts
type Foo (line 1) | enum Foo {
FILE: tests/cases/enumMemberWithQuotedMemberName.ts
type E1 (line 1) | enum E1 {
FILE: tests/cases/generator.ts
class c (line 8) | class c {
method method (line 9) | *method() {
method [a*b] (line 11) | *[a*b]() {
method 'some*string' (line 13) | *'some*string'() {
method overload (line 17) | * overload<T extends (string | number)>(sn: T): T {
FILE: tests/cases/importTypes.ts
class Bar2 (line 3) | class Bar2 {
method constructor (line 5) | constructor(input?: any) {}
FILE: tests/cases/inferTypes.ts
type ReturnType (line 1) | type ReturnType<T extends Function> = T extends ((...args: any[]) => inf...
type ArgumentType (line 2) | type ArgumentType<T extends (x: any) => any> = T extends (a: infer A) =>...
type X1 (line 3) | type X1<T extends { x: any, y: any }> = T extends { x: infer X, y: infer...
type B1 (line 4) | type B1<S> = S extends A1<infer T, infer U> ? [T, U] : never;
type C1 (line 5) | type C1<S> = S extends A1<infer T extends number, infer U extends string...
FILE: tests/cases/intrinsic.ts
type Uppercase (line 1) | type Uppercase<S extends string> = intrinsic;
type Lowercase (line 2) | type Lowercase<S extends string> = intrinsic;
type Capitalize (line 3) | type Capitalize<S extends string> = intrinsic;
FILE: tests/cases/issue327.ts
type X (line 1) | interface X {
class x (line 6) | class x { }
FILE: tests/cases/issue806.ts
class Foo (line 1) | class Foo {
method foo (line 2) | public foo(): boolean {
method bar (line 6) | private bar(): void {}
FILE: tests/cases/issue812.ts
type Foo (line 1) | type Foo = {
FILE: tests/cases/issue814.ts
class A (line 1) | class A{}
class B (line 2) | class B{}
FILE: tests/cases/issue907.ts
type A (line 1) | type A = typeof a extends number ? 0 : 1;
FILE: tests/cases/issue909.ts
class TestClass (line 1) | class TestClass {
FILE: tests/cases/issue932.ts
class A (line 1) | class A {
FILE: tests/cases/issue935.ts
type FeatureControl (line 1) | interface FeatureControl {
type RegisterLanguageSupportOptions (line 9) | interface RegisterLanguageSupportOptions {
type API (line 17) | interface API {
FILE: tests/cases/issue940.ts
class Foo (line 1) | class Foo {
method bar (line 7) | bar() {
FILE: tests/cases/issue948.ts
class A (line 1) | class A {
FILE: tests/cases/issue949.ts
type PackageJson (line 1) | interface PackageJson {
function foo (line 10) | function foo() { }
FILE: tests/cases/issue951.ts
type thing (line 1) | type thing = <T extends object>(what: T) => ReturnType<typeof generic<T>>
FILE: tests/cases/issue957.ts
type UseQuery (line 1) | type UseQuery<TData, TVariables> = typeof useQuery<TData, TVariables>
FILE: tests/cases/issue971.ts
class Test (line 9) | class Test {
method a (line 10) | a() {
method b (line 16) | b(): Promise<string> {
method c (line 27) | c() {}
FILE: tests/cases/jsdocProperty.ts
class MyClass (line 23) | class MyClass {
method constructor (line 24) | constructor(name) {
FILE: tests/cases/keyof.ts
class Shape (line 1) | class Shape {
type T01 (line 8) | type T01 = keyof Object;
type T10 (line 10) | type T10 = Shape["name"];
type T30 (line 12) | type T30 = string[]["length"];
type T31 (line 13) | type T31 = string[][number];
type T50 (line 15) | type T50 = any[any];
type T51 (line 16) | type T51 = any[number];
type T52 (line 17) | type T52 = any[string];
type T60 (line 19) | type T60 = {}["toString"];
type T61 (line 20) | type T61 = []["toString"];
function getProperty (line 24) | function getProperty<T, K extends keyof T>(obj: T, key: K) {
function setProperty (line 28) | function setProperty<T, K extends keyof T>(obj: T, key: K, value: T[K]) {
FILE: tests/cases/mappedType.ts
type Item (line 1) | type Item = { a: string, b: number, c: boolean };
type T1 (line 3) | type T1 = { [P in "x" | "y"]: number };
type T2 (line 4) | type T2 = { [P in "x" | "y"]: P };
type T3 (line 5) | type T3 = { [P in "a" | "b"]: Item[P] };
type T4 (line 6) | type T4 = { [P in keyof Item]: Date };
type T5 (line 7) | type T5 = { [P in keyof Item]: Item[P] };
type T6 (line 8) | type T6 = { readonly [P in keyof Item]: Item[P] };
type T7 (line 9) | type T7 = { [P in keyof Item]: Array<Item[P]> };
type Partial (line 12) | type Partial<T> = {
type Readonly (line 17) | type Readonly<T> = {
type Pick (line 22) | type Pick<T, K extends keyof T> = {
type Record (line 27) | type Record<K extends string | number, T> = {
type Proxy (line 32) | type Proxy<T> = {
type Proxify (line 38) | type Proxify<T> = {
FILE: tests/cases/modifierOperators.ts
type Mutable (line 1) | type Mutable<T> = {
type Required (line 4) | type Required<T> = {
type ReadonlyAndPartial (line 7) | type ReadonlyAndPartial<T> = {
FILE: tests/cases/multilineDestructuringParametersOfArrow.ts
class c (line 1) | class c {
FILE: tests/cases/namedTuples.ts
type Segment (line 1) | type Segment = [length: number, count: number];
type SegmentAnnotated (line 2) | type SegmentAnnotated = [
type WithOptAndRest (line 14) | type WithOptAndRest = [first: number, second?: number, ...rest: string[]];
function useState (line 15) | function useState<T>(initial: T): [value: T, setter: (T) => void] {
type Iter (line 18) | type Iter = Func<[step: number, iterations: number]>;
function readSegment (line 19) | function readSegment([length, count]: [number, number]) {}
type RecursiveTupleA (line 20) | type RecursiveTupleA = [initial: string, next: RecursiveTupleA];
type RecusiveRest (line 21) | type RecusiveRest = [first: string, ...rest: RecusiveRest[]];
type RecusiveRest2 (line 22) | type RecusiveRest2 = [string, ...RecusiveRest2[]];
type Segment1 (line 24) | type Segment1 = [length: number, number];
type List (line 25) | type List = [item: any, ...any];
type Pair (line 26) | type Pair = [item: any, any?];
type Opt (line 27) | type Opt = [element: string?];
type Trailing (line 28) | type Trailing = [first: string, rest: ...string[]];
type OptTrailing (line 29) | type OptTrailing = [first: string, rest: ...string[]?];
type OptRest (line 30) | type OptRest = [first: string, ...rest?: string[]];
type NonArrayRest (line 31) | type NonArrayRest = [first: string, ...rest: number];
type RecusiveRestUnlabeled (line 32) | type RecusiveRestUnlabeled = [string, ...RecusiveRestUnlabeled];
type RecusiveRest (line 33) | type RecusiveRest = [first: string, ...rest: RecusiveRest];
FILE: tests/cases/numericAsType.ts
type a (line 2) | type a = 1 | 3 | 5 | 7 | 9;
FILE: tests/cases/parameterBindingPattern.ts
function foo (line 2) | function foo() {
function foo2 (line 16) | function foo2({x: k, y: { c: d}, z: [e, { hello }], x } = foo()) {
function foo3 (line 18) | function foo3({x: k, y: { c: d}, z: [e, { hello }], x }: {
function bar (line 33) | function bar() {
function bar2 (line 37) | function bar2([{hello}, world] = bar()) {
function bar3 (line 39) | function bar3([{hello}, world]: [{ hello: string }, string] = bar()) {
FILE: tests/cases/partialTypeArguments.ts
type A (line 4) | type A = Foo<_, string>;
type A2 (line 8) | type A2 = Foo<string, _>;
type A3 (line 9) | type A3 = _;
FILE: tests/cases/pr48_noSemiColon.ts
class Test (line 1) | class Test {
type Stats (line 7) | type Stats = fs.Stats
function isFile (line 13) | function isFile(path: string): Promise<boolean> {
FILE: tests/cases/privateFields.ts
class Greeter (line 1) | class Greeter {
method method (line 136) | method() {
FILE: tests/cases/property.ts
class c (line 1) | class c {
FILE: tests/cases/propertyNameInObjectBindingElement.ts
function bar (line 2) | function bar({ "propName": prop, 'propName2': prop2, ["string"]: str }){
FILE: tests/cases/readonly.ts
type X (line 1) | interface X {
class C (line 6) | class C {
FILE: tests/cases/readonlyModifier.ts
function f1 (line 1) | function f1(mt: [number, number], rt: readonly [number, number]) {
function f2 (line 4) | function f2(ma: string[], ra: readonly string[], mt: [string, string], r...
type ReadWrite (line 7) | type ReadWrite<T> = { -readonly [P in keyof T] : T[P] };
FILE: tests/cases/restAndSpreadExpression.ts
function foo (line 1) | function foo(...rest) {
function f (line 10) | function f<T, U>(t: T, u: U): { id: string, ...T, ...U } {
function myFunction (line 13) | function myFunction(v, w, x, y, z) { }
FILE: tests/cases/restInBindingPattern.ts
function a (line 3) | function a(...[a = 1, b = true]: string[]) { }
function b (line 4) | function b(...[...foo]: string[]) { }
function c (line 5) | function c(...{0: a, length, 3: d}: [boolean, string, number]) { }
function d (line 6) | function d(...[a, , d]: [boolean, string, number]) { }
FILE: tests/cases/templateLiteralType.ts
type EventName (line 1) | type EventName<T extends string> = `${T}Changed`;
type Concat (line 2) | type Concat<S1 extends string, S2 extends string> = `${S1}${S2}`;
type ToString (line 3) | type ToString<T extends string | number | boolean | bigint> = `${T}`;
type T0 (line 4) | type T0 = EventName<'foo'>;
type T1 (line 5) | type T1 = EventName<'foo' | 'bar' | 'baz'>;
type T2 (line 6) | type T2 = Concat<'Hello', 'World'>;
type T3 (line 7) | type T3 = `${'top' | 'bottom'}-${'left' | 'right'}`;
type T4 (line 8) | type T4 = ToString<'abc' | 42 | true | -1234n>;
type Digit (line 10) | type Digit = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
type Zip (line 11) | type Zip = `${Digit}${Digit}${Digit}${Digit}${Digit}`;
type GetterName (line 13) | type GetterName<T extends string> = `get${Capitalize<T>}`;
type Cases (line 14) | type Cases<T extends string> = `${Uppercase<T>} ${Lowercase<T>} ${Capita...
type T10 (line 15) | type T10 = GetterName<'foo'>;
type T11 (line 16) | type T11 = Cases<'bar'>;
type T12 (line 17) | type T12 = Cases<'BAR'>;
function test (line 19) | function test<T extends 'foo' | 'bar'>(name: `get${Capitalize<T>}`) {
type MatchPair (line 24) | type MatchPair<S extends string> = S extends `[${infer A},${infer B}]` ?...
type T20 (line 26) | type T20 = MatchPair<'[1,2]'>;
type T21 (line 27) | type T21 = MatchPair<'[foo,bar]'>;
type T22 (line 28) | type T22 = MatchPair<' [1,2]'>;
type T23 (line 29) | type T23 = MatchPair<'[123]'>;
type T24 (line 30) | type T24 = MatchPair<'[1,2,3,4]'>;
type FirstTwoAndRest (line 32) | type FirstTwoAndRest<S extends string> = S extends `${infer A}${infer B}...
type T25 (line 34) | type T25 = FirstTwoAndRest<'abcde'>;
type T26 (line 35) | type T26 = FirstTwoAndRest<'ab'>;
type T27 (line 36) | type T27 = FirstTwoAndRest<'a'>;
type Join (line 38) | type Join<T extends unknown[], D extends string> =
type T30 (line 43) | type T30 = Join<[1, 2, 3, 4], '.'>;
type T31 (line 44) | type T31 = Join<['foo', 'bar', 'baz'], '-'>;
type T32 (line 45) | type T32 = Join<[], '.'>;
type Split (line 48) | type Split<S extends string, D extends string> =
type T40 (line 54) | type T40 = Split<'foo', '.'>;
type T41 (line 55) | type T41 = Split<'foo.bar.baz', '.'>;
type T42 (line 56) | type T42 = Split<'foo.bar', ''>;
type T43 (line 57) | type T43 = Split<any, '.'>;
type PropType (line 60) | type PropType<T, Path extends string> =
type Getters (line 77) | type Getters<T> = { [P in keyof T & string as `get${Capitalize<P>}`]: ()...
type T50 (line 78) | type T50 = Getters<{ foo: string, bar: number }>;
type Methods (line 81) | type Methods<T> = { [P in keyof T as T[P] extends Function ? P : never]:...
type T60 (line 82) | type T60 = Methods<{ foo(): number, bar: boolean }>;
type DoubleProp (line 84) | type DoubleProp<T> = { [P in keyof T & string as `${P}1` | `${P}2`]: T[P] }
type T70 (line 85) | type T70 = DoubleProp<{ a: string, b: number }>;
FILE: tests/cases/typeofClass.ts
type TC1 (line 1) | type TC1 = typeof class {
FILE: tests/cases/typeparameterDefault.ts
type PromiseLike (line 1) | interface PromiseLike<T> {
FILE: tests/cases/using.ts
method using (line 60) | using() {}
method using (line 61) | static using() {}
method using (line 63) | get using() {}
method using (line 64) | static get using() {}
method using (line 66) | set using() {}
method using (line 67) | static set using(v) {}
FILE: tests/cases/variableBindingPattern.ts
function foo (line 2) | function foo() {
function bar (line 31) | function bar() {
FILE: tests/cases/varianceAnnotations.ts
type Provider (line 1) | type Provider<out T> = () => T;
type Consumer (line 2) | type Consumer<in T> = (x: T) => void;
type Mapper (line 3) | type Mapper<in T, out U> = (x: T) => U;
type Processor (line 4) | type Processor<in out T> = (x: T) => T;
type Foo (line 5) | type Foo<in T> = {
type Bar (line 9) | interface Bar<T> {
type Bar (line 13) | interface Bar<out T> {
type Bar (line 17) | interface Bar<in T> {
FILE: tests/test.ts
function ensureCleanGeneratedFolder (line 11) | function ensureCleanGeneratedFolder() {
function assertBaselinesMatch (line 46) | function assertBaselinesMatch(file: string, generatedText: string) {
Condensed preview — 962 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (8,078K chars).
[
{
"path": ".gitattributes",
"chars": 224,
"preview": "# Make sure baseline files have consistent line endings\n*.txt text eol=lf\n\n# Override classification\n*.YAML-tmLanguage l"
},
{
"path": ".github/ISSUE_TEMPLATE/bug_report.md",
"chars": 324,
"preview": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**[JavaScript an"
},
{
"path": ".github/workflows/CI.yml",
"chars": 781,
"preview": "name: CI\non:\n push:\n branches:\n - main\n - master\n pull_request:\n branches:\n - main\n - master"
},
{
"path": ".github/workflows/accept-baselines.yml",
"chars": 662,
"preview": "name: Accept Baselines\n\non:\n workflow_dispatch: {}\n\njobs:\n build:\n runs-on: ubuntu-latest\n\n steps:\n - uses: a"
},
{
"path": ".gitignore",
"chars": 77,
"preview": "node_modules\nbuild/*.js\ntests/*.js\ntests/generated/*\nxunit.xml\n*.tsbuildinfo\n"
},
{
"path": ".vscode/settings.json",
"chars": 256,
"preview": "// Place your settings in this file to overwrite default and user settings.\n{\n \"editor.insertSpaces\": true,\n \"file"
},
{
"path": "Comments.tmPreferences",
"chars": 833,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.c"
},
{
"path": "ErrorList.YAML-tmLanguage",
"chars": 719,
"preview": "# [PackageDev] target_format: plist, ext: tmLanguage\n---\nname: Error List\nscopeName: text.error-list\nuuid: 52410ea6-4de5"
},
{
"path": "FindRefs.YAML-tmLanguage",
"chars": 13378,
"preview": "# [PackageDev] target_format: plist, ext: hidden-tmLanguage\nname: Find Refs\nscopeName: text.find-refs\nuuid: de594c8b-268"
},
{
"path": "LICENSE.txt",
"chars": 1093,
"preview": "Copyright (c) Microsoft Corporation\nAll rights reserved.\n\nMIT License\n\nPermission is hereby granted, free of charge, to "
},
{
"path": "README.md",
"chars": 1260,
"preview": "# TypeScript-TmLanguage\n["
},
{
"path": "SECURITY.md",
"chars": 2757,
"preview": "<!-- BEGIN MICROSOFT SECURITY.MD V0.0.7 BLOCK -->\n\n## Security\n\nMicrosoft takes the security of our software products an"
},
{
"path": "ThirdPartyNotices.txt",
"chars": 3471,
"preview": "\nTHIRD-PARTY SOFTWARE NOTICES AND INFORMATION\nDo Not Translate or Localize\n\nLatest TypeScript and Javascript Grammar inc"
},
{
"path": "TypeScript Indent.YAML-tmPreferences",
"chars": 362,
"preview": "# [PackageDev] target_format: plist, ext: tmPreferences\n---\nname: TypeScript Indent\nuuid: 77966fa8-af34-4f1e-8535-e556d5"
},
{
"path": "TypeScript Indent.tmPreferences",
"chars": 677,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "TypeScript.YAML-tmLanguage",
"chars": 139638,
"preview": "# [PackageDev] target_format: plist, ext: tmLanguage\n---\nname: TypeScript\nscopeName: source.ts\nfileTypes: [ts]\nuuid: ef9"
},
{
"path": "TypeScript.YAML-tmTheme",
"chars": 3845,
"preview": "# VS theme settings for TypeScript\r\n\r\n---\r\nname: TypeScript\r\nuuid: 91489F9C-F403-4CF0-993D-EAAF9149E40E\r\n\r\nsettings:\r\n- "
},
{
"path": "TypeScript.tmLanguage",
"chars": 399591,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "TypeScript.tmTheme",
"chars": 7960,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "TypeScriptReact.YAML-tmLanguage",
"chars": 7152,
"preview": "# [PackageDev] target_format: plist, ext: tmLanguage\n# Similar to TypeScript.YAML-tmLanguage except:\n# - Remove type a"
},
{
"path": "TypeScriptReact.YAML-tmTheme",
"chars": 883,
"preview": "# VS theme settings for TypeScriptReact\r\n# These only contains additions to existing TypeScript theme\r\n\r\n---\r\nname: Type"
},
{
"path": "TypeScriptReact.tmLanguage",
"chars": 403501,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "TypeScriptReact.tmTheme",
"chars": 9431,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "build/build.ts",
"chars": 5868,
"preview": "import fs = require('fs');\nimport path = require('path');\nimport yaml = require('js-yaml');\nimport plist = require('plis"
},
{
"path": "build/index.d.ts",
"chars": 1468,
"preview": "declare module \"plist\" {\r\n export function build(json: any): string;\r\n}\r\n\r\ndeclare interface MapLike<T> {\r\n [s: st"
},
{
"path": "build/tsconfig.json",
"chars": 220,
"preview": "{\n \"compilerOptions\": {\n \"lib\": [\"ES2023\"],\n \"target\": \"ES2023\",\n \"module\": \"nodenext\",\n "
},
{
"path": "package.json",
"chars": 878,
"preview": "{\n \"name\": \"typescript-tmlanguage\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"description\": \"TextMate grammar files f"
},
{
"path": "tests/baselines/Abstracts.baseline.txt",
"chars": 13031,
"preview": "original file\n-----------------------------------\nabstract class Animal {\n\t public age: number;\n\t public yearsLeft() {"
},
{
"path": "tests/baselines/ArrowFunctionInsideTypeAssertion.baseline.txt",
"chars": 29182,
"preview": "original file\n-----------------------------------\n// @onlyOwnGrammar - As this has type assertion\n// Issue: https://gith"
},
{
"path": "tests/baselines/AsConstSatisfies.baseline.txt",
"chars": 1785,
"preview": "original file\n-----------------------------------\nlet a = {} as const satisfies {};\n\n-----------------------------------"
},
{
"path": "tests/baselines/Comments.baseline.txt",
"chars": 130224,
"preview": "original file\n-----------------------------------\n/*\nTests for comments in general.\n\nPull requests:\n\t- https://github.co"
},
{
"path": "tests/baselines/FunctionMethodOverloads.baseline.txt",
"chars": 91213,
"preview": "original file\n-----------------------------------\n/* Function overload tests */\nexport function testFunctionOverload(p: "
},
{
"path": "tests/baselines/FunctionMethodParameters.baseline.txt",
"chars": 52698,
"preview": "original file\n-----------------------------------\n/* Function parameter tests */\nfunction testFunctionParamType(\n m1:"
},
{
"path": "tests/baselines/FunctionMethodReturnTypes.baseline.txt",
"chars": 181148,
"preview": "original file\n-----------------------------------\n/* Function return type tests */\nexport function testFunctionReturnTyp"
},
{
"path": "tests/baselines/Issue10.baseline.txt",
"chars": 9112,
"preview": "original file\n-----------------------------------\nenum Hello {\n A,\n B\n}\n\nclass World {\n normal() {\n let "
},
{
"path": "tests/baselines/Issue1006.baseline.txt",
"chars": 1256,
"preview": "original file\n-----------------------------------\nconst a = /.*/v;\n\n-----------------------------------\n\nGrammar: TypeSc"
},
{
"path": "tests/baselines/Issue11.baseline.txt",
"chars": 3422,
"preview": "original file\n-----------------------------------\nfor (var i=0; i<10; i++) {\n var x = 1;\n var p = \"\";\n}\n----------"
},
{
"path": "tests/baselines/Issue110.baseline.txt",
"chars": 13082,
"preview": "original file\n-----------------------------------\nlet number1 = 0x100 \nlet number2 = 14e15\nlet number3 = 10.42e41.5 \nl"
},
{
"path": "tests/baselines/Issue112.baseline.txt",
"chars": 5399,
"preview": "original file\n-----------------------------------\nreturn new vscode.Variable(property.name, displayValue, variablesRefer"
},
{
"path": "tests/baselines/Issue114.baseline.txt",
"chars": 10591,
"preview": "original file\n-----------------------------------\nexport type BreakpointType = 'line' | 'call' | 'return' | 'exception' "
},
{
"path": "tests/baselines/Issue115.baseline.txt",
"chars": 17775,
"preview": "original file\n-----------------------------------\nclass Foo {\n bar(a: Foo, b: string) { }\n}\n\nfunction foo(a: Foo, b: "
},
{
"path": "tests/baselines/Issue119.baseline.txt",
"chars": 4896,
"preview": "original file\n-----------------------------------\nclass x {\n public SomeMethod() {\n }\n public OtherMethod() { }"
},
{
"path": "tests/baselines/Issue124.baseline.txt",
"chars": 13422,
"preview": "original file\n-----------------------------------\n/*\n\tSolving Issue #124, #80, #81\n\tAdding capability of ternary strings"
},
{
"path": "tests/baselines/Issue131.baseline.txt",
"chars": 1231,
"preview": "original file\n-----------------------------------\nfoo.namespace\nfoo.any\nvar number, string;\nnumber\nstring\n--------------"
},
{
"path": "tests/baselines/Issue133.baseline.txt",
"chars": 3096,
"preview": "original file\n-----------------------------------\ninterface I {\n $fieldName: string;\n $getFieldViewCtrl: () => FieldVi"
},
{
"path": "tests/baselines/Issue135.baseline.txt",
"chars": 1555,
"preview": "original file\n-----------------------------------\nimport http = require('http');\n-----------------------------------\n\nGr"
},
{
"path": "tests/baselines/Issue139.baseline.txt",
"chars": 3779,
"preview": "original file\n-----------------------------------\nnew new Proxy(function fn() {\n console.log(this.constructor.name);\n"
},
{
"path": "tests/baselines/Issue142.baseline.txt",
"chars": 6523,
"preview": "original file\n-----------------------------------\nclass x {\n abc = () =>\n this.func(this.arr.concat(['one 1', 'two 2"
},
{
"path": "tests/baselines/Issue143.baseline.txt",
"chars": 19917,
"preview": "original file\n-----------------------------------\nimport {Component, HostListener, Directive} from 'angular2/core';\n\n@Di"
},
{
"path": "tests/baselines/Issue146.baseline.txt",
"chars": 4252,
"preview": "original file\n-----------------------------------\nfunction foo() {\n return 'bar';\n}\n\nfunction* foo() {\n yield 'bar"
},
{
"path": "tests/baselines/Issue148.baseline.txt",
"chars": 9053,
"preview": "original file\n-----------------------------------\nclass Test {\n constructor(\n @inject private test: string,\n "
},
{
"path": "tests/baselines/Issue149.baseline.txt",
"chars": 15236,
"preview": "original file\n-----------------------------------\nexport function fn(s: string): new() => View\nexport function fn(s: str"
},
{
"path": "tests/baselines/Issue152.baseline.txt",
"chars": 5049,
"preview": "original file\n-----------------------------------\nvar node;\nfor(var i; i< 45;i++) {\n node = 234;\n\n node.a = 122;\n "
},
{
"path": "tests/baselines/Issue153.baseline.txt",
"chars": 70415,
"preview": "original file\n-----------------------------------\nimport {Vector3, Vector} from 'vectors';\n\n/**\n * A simple 3x3 matrix s"
},
{
"path": "tests/baselines/Issue154.baseline.txt",
"chars": 6595,
"preview": "original file\n-----------------------------------\nclass TestCase {\n ['foo']() {\n this.registerComponent('foo-b"
},
{
"path": "tests/baselines/Issue155.baseline.txt",
"chars": 24960,
"preview": "original file\n-----------------------------------\nmatchQuery.find().then(function (results) {\n for (i=0;i<results"
},
{
"path": "tests/baselines/Issue156.baseline.txt",
"chars": 3723,
"preview": "original file\n-----------------------------------\nclass Test {\n\tmmm(p1: string | {}, p2: string) \n\t{\n \n\t}\n}\n-----"
},
{
"path": "tests/baselines/Issue157.baseline.txt",
"chars": 4696,
"preview": "original file\n-----------------------------------\nconst items = new Set<string>([ 'foo', 'bar' ]);\nitems.delete('foo');\n"
},
{
"path": "tests/baselines/Issue158.baseline.txt",
"chars": 5029,
"preview": "original file\n-----------------------------------\nclass Test\n{\n public constructor()\n {\n for (let it=0; it<"
},
{
"path": "tests/baselines/Issue161.baseline.txt",
"chars": 5076,
"preview": "original file\n-----------------------------------\n// @onlyOwnGrammar - As this has jsx\nlet root: React.ReactElement<{}>;"
},
{
"path": "tests/baselines/Issue163.baseline.txt",
"chars": 2239,
"preview": "original file\n-----------------------------------\nconst o = {\n async f() {\n\n }\n};\n--------------------------------"
},
{
"path": "tests/baselines/Issue166.baseline.txt",
"chars": 14839,
"preview": "original file\n-----------------------------------\ntype x = string | \"aaa\" | \"bbb\" | \"ccc\" | number;\ntype x1 = string |\n "
},
{
"path": "tests/baselines/Issue171.baseline.txt",
"chars": 18362,
"preview": "original file\n-----------------------------------\nclass c {\n constructor \n (\n private parameters: {\n "
},
{
"path": "tests/baselines/Issue172.baseline.txt",
"chars": 3609,
"preview": "original file\n-----------------------------------\nlet f = async (x) => {};\nlet f2 = async function(x) {};\n--------------"
},
{
"path": "tests/baselines/Issue175.baseline.txt",
"chars": 1659,
"preview": "original file\n-----------------------------------\nvar $ = '';\nvar $foo = '';\n\n-----------------------------------\n\nGramm"
},
{
"path": "tests/baselines/Issue177.baseline.txt",
"chars": 1562,
"preview": "original file\n-----------------------------------\n() => (/s/);\n() => /s/;\n-----------------------------------\n\nGrammar: "
},
{
"path": "tests/baselines/Issue178.baseline.txt",
"chars": 14483,
"preview": "original file\n-----------------------------------\nconst a: { [key: string]: () => string } = null;\nconst b: { [key: stri"
},
{
"path": "tests/baselines/Issue180.baseline.txt",
"chars": 13583,
"preview": "original file\n-----------------------------------\nif (typeof oSettings.aanFeatures.f != 'undefined')\n{\n var n = oSett"
},
{
"path": "tests/baselines/Issue182.baseline.txt",
"chars": 3342,
"preview": "original file\n-----------------------------------\nif (this.PListCells.length<value && (!this.ListList || !this.DelayedUp"
},
{
"path": "tests/baselines/Issue183.baseline.txt",
"chars": 8852,
"preview": "original file\n-----------------------------------\nclass Sample2\n{\n constructor()\n {\n }\n\n callback = (): void"
},
{
"path": "tests/baselines/Issue186.baseline.txt",
"chars": 12142,
"preview": "original file\n-----------------------------------\nfunction myFunction(param1, param2, number, string, boolean) {\n let y"
},
{
"path": "tests/baselines/Issue187.baseline.txt",
"chars": 8695,
"preview": "original file\n-----------------------------------\nconst trim = module.exports = str => trim.trailing(trim.leading(str));"
},
{
"path": "tests/baselines/Issue191.baseline.txt",
"chars": 31176,
"preview": "original file\n-----------------------------------\nclass Thing {\n constructor(public content: string){\n var pro"
},
{
"path": "tests/baselines/Issue193.baseline.txt",
"chars": 4626,
"preview": "original file\n-----------------------------------\nfunction Main_Функция(s: string)\n{\n}\n\nfunction Функция_Main(s: string"
},
{
"path": "tests/baselines/Issue197.baseline.txt",
"chars": 23123,
"preview": "original file\n-----------------------------------\n export class sampleClass {\n public equipmentTypeList: string["
},
{
"path": "tests/baselines/Issue198.baseline.txt",
"chars": 9149,
"preview": "original file\n-----------------------------------\nlet a = 0, b = 0, c = 0;\nlet value = a / b\n / c;\nlet value2 = a / b"
},
{
"path": "tests/baselines/Issue200.baseline.txt",
"chars": 5154,
"preview": "original file\n-----------------------------------\n\n\ndeclare module 'goog:goog.i18n.NumberFormatSymbols_en_TT' {\n import"
},
{
"path": "tests/baselines/Issue202.baseline.txt",
"chars": 3911,
"preview": "original file\n-----------------------------------\ninterface Test<T> {\n test: T;\n}\n\ninterface Props {\n prop: Test<T"
},
{
"path": "tests/baselines/Issue203.baseline.txt",
"chars": 6319,
"preview": "original file\n-----------------------------------\nvar [] = 'fafa'.replace('blah');\nconsole.log('hello');\n\nvar [] = 'fafa"
},
{
"path": "tests/baselines/Issue206.baseline.txt",
"chars": 17408,
"preview": "original file\n-----------------------------------\ninterface A {}\ninterface B {}\ninterface C {}\n\ntype D = A | B | C\ntype "
},
{
"path": "tests/baselines/Issue208.baseline.txt",
"chars": 18373,
"preview": "original file\n-----------------------------------\nvar someVar = new Thing<number, string>('data');\nvar someVar = makeThi"
},
{
"path": "tests/baselines/Issue212.baseline.txt",
"chars": 6692,
"preview": "original file\n-----------------------------------\nlet from = neki;\nfrom = a; // is a variable and should be in white col"
},
{
"path": "tests/baselines/Issue215.baseline.txt",
"chars": 5335,
"preview": "original file\n-----------------------------------\nfunction test() {\n for (var i=0 ; i<l ; ++i) {\n\n }\n}\n\nfor (var i"
},
{
"path": "tests/baselines/Issue216.baseline.txt",
"chars": 6578,
"preview": "original file\n-----------------------------------\nclass MyType\n{\n public myFunction = (): void =>\n {\n // Fr"
},
{
"path": "tests/baselines/Issue217.baseline.txt",
"chars": 9321,
"preview": "original file\n-----------------------------------\nexport class StatusSelector {\n @Output() select = new EventEmitter()\n"
},
{
"path": "tests/baselines/Issue218.baseline.txt",
"chars": 3435,
"preview": "original file\n-----------------------------------\nclass A {\n foo(a, b) {\n }\n [foo](a, b) {\n }\n}\n------------"
},
{
"path": "tests/baselines/Issue219.baseline.txt",
"chars": 2599,
"preview": "original file\n-----------------------------------\nconst { \n map, \n coordinate \n} = this.props\nif (!map) return;\nva"
},
{
"path": "tests/baselines/Issue22.baseline.txt",
"chars": 2185,
"preview": "original file\n-----------------------------------\napp.get('/test/', (req, res) => {\n});\n--------------------------------"
},
{
"path": "tests/baselines/Issue221.baseline.txt",
"chars": 5500,
"preview": "original file\n-----------------------------------\nclass syntaxHighlightBug {\n\n variable = \n {\"example\":1};\n\n pu"
},
{
"path": "tests/baselines/Issue223.baseline.txt",
"chars": 2888,
"preview": "original file\n-----------------------------------\nfor (i = 0; i<len ; i++) {\n if (foo) {\n bar = true \n break \n }"
},
{
"path": "tests/baselines/Issue226.baseline.txt",
"chars": 2722,
"preview": "original file\n-----------------------------------\nasync function x() {\n\n}\nconst y = async () => { }\n--------------------"
},
{
"path": "tests/baselines/Issue230.baseline.txt",
"chars": 29830,
"preview": "original file\n-----------------------------------\n// Note: `new Date` without parenthesis (`new Date()`)\nctrl.filter(\"da"
},
{
"path": "tests/baselines/Issue232.baseline.txt",
"chars": 4680,
"preview": "original file\n-----------------------------------\nfor( let [k, component] of this.components){\n let bounds = componen"
},
{
"path": "tests/baselines/Issue235.baseline.txt",
"chars": 5497,
"preview": "original file\n-----------------------------------\nclass A {\n @Route.GET('/*')\n get(q: Request, s: Response): void "
},
{
"path": "tests/baselines/Issue236.baseline.txt",
"chars": 5814,
"preview": "original file\n-----------------------------------\nclass Test {\n public before() {\n // ...\n }\n\n public [S"
},
{
"path": "tests/baselines/Issue237.baseline.txt",
"chars": 1836,
"preview": "original file\n-----------------------------------\nexport type Test = string // wrong comment color\n "
},
{
"path": "tests/baselines/Issue239.baseline.txt",
"chars": 4676,
"preview": "original file\n-----------------------------------\n// @onlyOwnGrammar - As this has jsx\n const test = (true) ? <p>Broken "
},
{
"path": "tests/baselines/Issue241.baseline.txt",
"chars": 19198,
"preview": "original file\n-----------------------------------\nfunction f(): () => number {\n const x = 0;\n}\nfunction foo(): [numbe"
},
{
"path": "tests/baselines/Issue243.baseline.txt",
"chars": 213520,
"preview": "original file\n-----------------------------------\n'use strict';\n\n var pieces = [];\n var numeration = [];\n\n"
},
{
"path": "tests/baselines/Issue244.baseline.txt",
"chars": 6601,
"preview": "original file\n-----------------------------------\na.withLatestFrom(axis === 'x' ? initialX : initialY)\n .map(x => undefi"
},
{
"path": "tests/baselines/Issue247.baseline.txt",
"chars": 1370,
"preview": "original file\n-----------------------------------\n@dec<{}>()\nclass Test {\n}\n\n-----------------------------------\n\nGramma"
},
{
"path": "tests/baselines/Issue248.baseline.txt",
"chars": 29841,
"preview": "original file\n-----------------------------------\nclass C1 {\n m1 = 1;\n static s1() {\n return [() => (new th"
},
{
"path": "tests/baselines/Issue249.baseline.txt",
"chars": 7119,
"preview": "original file\n-----------------------------------\nconst selectDictionary = (dictionaries: StoredDictionaries, lang:strin"
},
{
"path": "tests/baselines/Issue250.baseline.txt",
"chars": 23053,
"preview": "original file\n-----------------------------------\n/** Meta-part that defins a Form */\nexport class FormType extends Type"
},
{
"path": "tests/baselines/Issue251.baseline.txt",
"chars": 11922,
"preview": "original file\n-----------------------------------\nfor(var j=0; (j<rows && l<num); j++) {\n for(var k = 0; (k<cols && l<n"
},
{
"path": "tests/baselines/Issue252.baseline.txt",
"chars": 6686,
"preview": "original file\n-----------------------------------\nfunction getPage(p, base) {\n if (filename == base + \"index\") { var "
},
{
"path": "tests/baselines/Issue262.baseline.txt",
"chars": 4561,
"preview": "original file\n-----------------------------------\nfor (let a = 1; a < 10; a++) {\n for (let b = 1; b < a; b++) {\n "
},
{
"path": "tests/baselines/Issue264.baseline.txt",
"chars": 2238,
"preview": "original file\n-----------------------------------\n// @onlyOwnGrammar - As this has jsx\n<List>\n <div >\n </div>\n</List >"
},
{
"path": "tests/baselines/Issue276.baseline.txt",
"chars": 8409,
"preview": "original file\n-----------------------------------\n/**\n * @param {string} value\n * @param {string[]} arrayValue\n * @param"
},
{
"path": "tests/baselines/Issue28.baseline.txt",
"chars": 4038,
"preview": "original file\n-----------------------------------\n\n/* Testing octals */\n\nvar x = 123;\nvar y = 0x123;\nvar z = 0b10101;\nva"
},
{
"path": "tests/baselines/Issue280.baseline.txt",
"chars": 29670,
"preview": "original file\n-----------------------------------\n// @onlyOwnGrammar - As this has jsx\nclass c {\n private renderForecast"
},
{
"path": "tests/baselines/Issue283.baseline.txt",
"chars": 130030,
"preview": "original file\n-----------------------------------\n// @onlyOwnGrammar - As this has jsx \nimport * as React from 'react';\n"
},
{
"path": "tests/baselines/Issue285.baseline.txt",
"chars": 3488,
"preview": "original file\n-----------------------------------\nlet model = {\n links: {\n new: \"sample\"\n "
},
{
"path": "tests/baselines/Issue288.baseline.txt",
"chars": 8934,
"preview": "original file\n-----------------------------------\n// Issue 288: \"function\" in \"functionName\" gets highlighted.\n// Fixed "
},
{
"path": "tests/baselines/Issue292.baseline.txt",
"chars": 5929,
"preview": "original file\n-----------------------------------\n const shellOptions: IOptions = {\n filesToOpen,\n file"
},
{
"path": "tests/baselines/Issue294.baseline.txt",
"chars": 3887,
"preview": "original file\n-----------------------------------\nswitch (0) {\n case 0: {\n const zero = 0;\n return zero"
},
{
"path": "tests/baselines/Issue3.baseline.txt",
"chars": 1363,
"preview": "original file\n-----------------------------------\nlet regex = /**/ /foo/;\n-----------------------------------\n\nGrammar: "
},
{
"path": "tests/baselines/Issue304.baseline.txt",
"chars": 14610,
"preview": "original file\n-----------------------------------\nexport const EditorPanel = connect(\n (state: Immutable<AppState>): "
},
{
"path": "tests/baselines/Issue305.baseline.txt",
"chars": 8756,
"preview": "original file\n-----------------------------------\nabstract class Base {\n protected abstract topic: string\n constru"
},
{
"path": "tests/baselines/Issue307.baseline.txt",
"chars": 7870,
"preview": "original file\n-----------------------------------\nclass Test {\n method() {\n const obj = { a: 'hello' };\n const {\n"
},
{
"path": "tests/baselines/Issue314.baseline.txt",
"chars": 2248,
"preview": "original file\n-----------------------------------\nlet x = a ? b as X : c;\nlet y = 123;\n---------------------------------"
},
{
"path": "tests/baselines/Issue318.baseline.txt",
"chars": 11496,
"preview": "original file\n-----------------------------------\n this.Then(\n /^display prompt in branch \"([^\"]*)\"$/,\n "
},
{
"path": "tests/baselines/Issue32.baseline.txt",
"chars": 9372,
"preview": "original file\n-----------------------------------\n/*\n\tTesting Isuue 32: Adding constructor as a support.type keword\n*/\n\n"
},
{
"path": "tests/baselines/Issue321.baseline.txt",
"chars": 134399,
"preview": "original file\n-----------------------------------\nexport abstract class ExpressionContainer implements debug.IExpression"
},
{
"path": "tests/baselines/Issue322.baseline.txt",
"chars": 6459,
"preview": "original file\n-----------------------------------\nexport enum TokenType {\n StartCommentTag,\n Comment,\n EndComme"
},
{
"path": "tests/baselines/Issue326.baseline.txt",
"chars": 1619,
"preview": "original file\n-----------------------------------\nclass Bar extends getFoo(\"baz\") {}\n-----------------------------------"
},
{
"path": "tests/baselines/Issue334.baseline.txt",
"chars": 21586,
"preview": "original file\n-----------------------------------\nvar Backbone= require(\"backbone\");\nvar SearchModel= require(\"./../sear"
},
{
"path": "tests/baselines/Issue335.baseline.txt",
"chars": 24093,
"preview": "original file\n-----------------------------------\nclass A1 {\n\tb() {\n\t\tlet d;\n\t\td.default = 1;\n\t}\n\n\tprivate static c() {\n"
},
{
"path": "tests/baselines/Issue337.baseline.txt",
"chars": 379,
"preview": "original file\n-----------------------------------\n#!/usr/bin/env node -r babel-register\n--------------------------------"
},
{
"path": "tests/baselines/Issue338.baseline.txt",
"chars": 6999,
"preview": "original file\n-----------------------------------\nlet a = {\n [['a', 'b', 'c'].join(' ')]: 'foo',\n};\n-----------------"
},
{
"path": "tests/baselines/Issue339.baseline.txt",
"chars": 22564,
"preview": "original file\n-----------------------------------\nfunction f() {\n\n class implements BeingSpreading<Spreading> {\n "
},
{
"path": "tests/baselines/Issue343.baseline.txt",
"chars": 9163,
"preview": "original file\n-----------------------------------\nconsole.log(`${Math.round(responseTime / requests)} ns (${Math.round(r"
},
{
"path": "tests/baselines/Issue344.baseline.txt",
"chars": 4617,
"preview": "original file\n-----------------------------------\nlet a = Array<number>(); // Highlight ok here\n\ninterface egGenericsI"
},
{
"path": "tests/baselines/Issue346.baseline.txt",
"chars": 42514,
"preview": "original file\n-----------------------------------\nfunction f()\n{\n\tlet t = 0\n\tlet TAU440 = Math.PI*2 * 440\n\n\tonmessage = "
},
{
"path": "tests/baselines/Issue347.baseline.txt",
"chars": 10530,
"preview": "original file\n-----------------------------------\nconst a = new Promise (resolve => {\n const file = this.props.doc.fi"
},
{
"path": "tests/baselines/Issue351.baseline.txt",
"chars": 2417,
"preview": "original file\n-----------------------------------\nthis._blockRenderMap = Map<any>({});\nthis._eventsMap = {};\n-----------"
},
{
"path": "tests/baselines/Issue356.baseline.txt",
"chars": 11525,
"preview": "original file\n-----------------------------------\nfunction formatBigNum(num) {\n num = Number(num)\n if (num < 10000) {\n"
},
{
"path": "tests/baselines/Issue357.baseline.txt",
"chars": 32004,
"preview": "original file\n-----------------------------------\n// @onlyOwnGrammar - As this has jsx\nconst ProductPrice = ({inStock, p"
},
{
"path": "tests/baselines/Issue359.baseline.txt",
"chars": 9237,
"preview": "original file\n-----------------------------------\nconst test = (value: string) => {\n const a = 123;\n const b = {\n "
},
{
"path": "tests/baselines/Issue36.baseline.txt",
"chars": 3870,
"preview": "original file\n-----------------------------------\nlet x = {\n hello() {\n let hello = \"world\";\n }\n};\n--------"
},
{
"path": "tests/baselines/Issue361.baseline.txt",
"chars": 2989,
"preview": "original file\n-----------------------------------\nconst constructor = someObject.prototype.constructor;\n const objectLit"
},
{
"path": "tests/baselines/Issue365.baseline.txt",
"chars": 9422,
"preview": "original file\n-----------------------------------\nclass Renamer {\n constructor (private readonly srcName: string, priva"
},
{
"path": "tests/baselines/Issue366.baseline.txt",
"chars": 2427,
"preview": "original file\n-----------------------------------\nlet foo = a ? b ? c : d : e;\nlet bar;\n--------------------------------"
},
{
"path": "tests/baselines/Issue368.baseline.txt",
"chars": 5138,
"preview": "original file\n-----------------------------------\nlet creditCard = 'cc';\nconst CREDIT_CARD = 'CC';\n\nconsole.log(`Payment"
},
{
"path": "tests/baselines/Issue37.baseline.txt",
"chars": 35239,
"preview": "original file\n-----------------------------------\n//Test For Scopes\n\nimport * as req from \"./Required\"\nimport { Scale } "
},
{
"path": "tests/baselines/Issue375.baseline.txt",
"chars": 28915,
"preview": "original file\n-----------------------------------\n// @onlyOwnGrammar - As this has type assertion\nclass Foo {\n constr"
},
{
"path": "tests/baselines/Issue376.baseline.txt",
"chars": 8637,
"preview": "original file\n-----------------------------------\n interface Itest {\n\ta: 'a1' // a1 is good\n\t\t| 'a2' // a2 is good\n\t\t| '"
},
{
"path": "tests/baselines/Issue377.baseline.txt",
"chars": 6696,
"preview": "original file\n-----------------------------------\ndt = ((dt[0] * 1e9 + dt[1]) / 1e6).toFixed(3).replace(/\\.?0+$/, '') + "
},
{
"path": "tests/baselines/Issue379.baseline.txt",
"chars": 3877,
"preview": "original file\n-----------------------------------\ninterface A {\n prop1: string\n prop2: string\n method1(): void\n"
},
{
"path": "tests/baselines/Issue380.baseline.txt",
"chars": 2322,
"preview": "original file\n-----------------------------------\nlet namespace;\nnamespace = `${\"a\"}`;\n\nlet x = 1\n----------------------"
},
{
"path": "tests/baselines/Issue381.baseline.txt",
"chars": 9025,
"preview": "original file\n-----------------------------------\nclass Foo{\n constructor(){\n\n }\n test(){\n return `/game.php?villa"
},
{
"path": "tests/baselines/Issue382.baseline.txt",
"chars": 24411,
"preview": "original file\n-----------------------------------\n\n class ConstrainedBasedObjectcolection<T extends Core.Model.DataEnt"
},
{
"path": "tests/baselines/Issue383.baseline.txt",
"chars": 21197,
"preview": "original file\n-----------------------------------\n// @onlyOwnGrammar - As this has jsx\n\nconst singleLineArrow = (first: "
},
{
"path": "tests/baselines/Issue384.baseline.txt",
"chars": 3655,
"preview": "original file\n-----------------------------------\ndeclare function foo(): any\ndeclare function foo(): any\n\nexport functi"
},
{
"path": "tests/baselines/Issue387.baseline.txt",
"chars": 24207,
"preview": "original file\n-----------------------------------\n//\n// Copyright 2016 Kary Foundation, Inc.\n// Author: Pouya Kary <k@"
},
{
"path": "tests/baselines/Issue388.baseline.txt",
"chars": 5920,
"preview": "original file\n-----------------------------------\nexport const fun = (param: ParamType): FunResult => { }\n\nexport const "
},
{
"path": "tests/baselines/Issue389.baseline.txt",
"chars": 1732,
"preview": "original file\n-----------------------------------\n[function ()\n{\n let foo;\n}];\n-----------------------------------\n\nG"
},
{
"path": "tests/baselines/Issue391.baseline.txt",
"chars": 34255,
"preview": "original file\n-----------------------------------\nvar interface = require('./../interface');\nvar ctrl = require('./contr"
},
{
"path": "tests/baselines/Issue393.baseline.txt",
"chars": 5395,
"preview": "original file\n-----------------------------------\nclass ColorsBars extends React.Component {\n\tconstructor(...args) {\n\t\ts"
},
{
"path": "tests/baselines/Issue394.baseline.txt",
"chars": 12008,
"preview": "original file\n-----------------------------------\n gulp.add('watch-' + (asset.name || asset.route), function ()\n "
},
{
"path": "tests/baselines/Issue396.baseline.txt",
"chars": 14928,
"preview": "original file\n-----------------------------------\n/* jshint esnext:true */\nlet it = require('./it');\nit.execute(function"
},
{
"path": "tests/baselines/Issue397.baseline.txt",
"chars": 2039,
"preview": "original file\n-----------------------------------\nconst a = Math.max(...x);\nconst b = 2;\n-------------------------------"
},
{
"path": "tests/baselines/Issue398.baseline.txt",
"chars": 6941,
"preview": "original file\n-----------------------------------\nlet x: Array<{ name: string, fn(): any, field: string }>\n-------------"
},
{
"path": "tests/baselines/Issue402.baseline.txt",
"chars": 41505,
"preview": "original file\n-----------------------------------\nipcMain.on('ELECTRON_GUEST_WINDOW_MANAGER_WEB_CONTENTS_METHOD', functi"
},
{
"path": "tests/baselines/Issue403IncorrectlyDetectedArrowTypeParameters.baseline.txt",
"chars": 326027,
"preview": "original file\n-----------------------------------\ne.ui.plugin.add(\"resizable\", \"grid\", {\n resize: function() "
},
{
"path": "tests/baselines/Issue403IncorrectlyDetectedFunctionCallAsArrow.baseline.txt",
"chars": 33077,
"preview": "original file\n-----------------------------------\np.parseJSON = function(t) {\n if (e.JSON && e.JSON.parse) return"
},
{
"path": "tests/baselines/Issue405.baseline.txt",
"chars": 5187,
"preview": "original file\n-----------------------------------\nfunction myFunction1\n (a: string)\n{\n var r = true;\n return true\n}\n"
},
{
"path": "tests/baselines/Issue407.baseline.txt",
"chars": 3728,
"preview": "original file\n-----------------------------------\nlet x: Map<string, string>;\nlet Y: Map<string, string>;\n--------------"
},
{
"path": "tests/baselines/Issue408.baseline.txt",
"chars": 1444,
"preview": "original file\n-----------------------------------\nassert(truthyValue, 'must be true');\npath(pathArgs);\n-----------------"
},
{
"path": "tests/baselines/Issue415.baseline.txt",
"chars": 6369,
"preview": "original file\n-----------------------------------\n// @onlyOwnGrammar - As this has jsx\n(<View />);\n(<dot.view />);\n(<dot"
},
{
"path": "tests/baselines/Issue417.baseline.txt",
"chars": 3131,
"preview": "original file\n-----------------------------------\nconst a = {\n 1: '1',\n '2': '2',\n}\n------------------------------"
},
{
"path": "tests/baselines/Issue418.baseline.txt",
"chars": 28436,
"preview": "original file\n-----------------------------------\nfunction merge(as, bs) {\n let res = []\n let ia = 0\n let ib = 0\n wh"
},
{
"path": "tests/baselines/Issue42.baseline.txt",
"chars": 6036,
"preview": "original file\n-----------------------------------\n return this.travelWorld((cell: Cell) => {\n "
},
{
"path": "tests/baselines/Issue420.baseline.txt",
"chars": 2622,
"preview": "original file\n-----------------------------------\nverify.quickInfos({\n 1: \"this: ContextualInterface\",\n 2: \"(param"
},
{
"path": "tests/baselines/Issue421.baseline.txt",
"chars": 3755,
"preview": "original file\n-----------------------------------\nfunction f(\n arg: 'x' |\n 'y',\n arg2: 1 |\n "
},
{
"path": "tests/baselines/Issue423.baseline.txt",
"chars": 3523,
"preview": "original file\n-----------------------------------\ninterface Foo {\n bar: string;\n}\n\ntype T = Foo; // line 5\ninterface "
},
{
"path": "tests/baselines/Issue427.baseline.txt",
"chars": 16835,
"preview": "original file\n-----------------------------------\nfunction a(): { [key: string]: number } | { [key: string]: number } { "
},
{
"path": "tests/baselines/Issue428.baseline.txt",
"chars": 5060,
"preview": "original file\n-----------------------------------\nexport function funct\n (a: number): string \n\nexport function funct\n "
},
{
"path": "tests/baselines/Issue43.baseline.txt",
"chars": 1862,
"preview": "original file\n-----------------------------------\nvar $this = $(this);\n$this.addClass(\"hehe\");\n-------------------------"
},
{
"path": "tests/baselines/Issue430.baseline.txt",
"chars": 27403,
"preview": "original file\n-----------------------------------\n// @onlyOwnGrammar - As this has jsx\nclass c {\nrender() {\n return t"
},
{
"path": "tests/baselines/Issue431.baseline.txt",
"chars": 1636,
"preview": "original file\n-----------------------------------\nmyFunc\n(...argName)\n\nfunction otherFunc() {} // <-- Not highlighted.\n-"
},
{
"path": "tests/baselines/Issue433.baseline.txt",
"chars": 1975,
"preview": "original file\n-----------------------------------\ndeclare module ILogin{\n export interface Z {}\n}\n-------------------"
},
{
"path": "tests/baselines/Issue434.baseline.txt",
"chars": 16789,
"preview": "original file\n-----------------------------------\nexport class SomeClass {\n private someMethod(): void {\n if ("
},
{
"path": "tests/baselines/Issue435.baseline.txt",
"chars": 4227,
"preview": "original file\n-----------------------------------\n/**\n * Manually add an item to the uploading queue.\n *\n * "
},
{
"path": "tests/baselines/Issue44.baseline.txt",
"chars": 2651,
"preview": "original file\n-----------------------------------\n\ninterface TestInterface {\n testvar: string;\n testfunc(): string;\n}\n"
},
{
"path": "tests/baselines/Issue441.baseline.txt",
"chars": 602,
"preview": "original file\n-----------------------------------\nfunc(1)\nasync(1)\n-----------------------------------\n\nGrammar: TypeScr"
},
{
"path": "tests/baselines/Issue444.baseline.txt",
"chars": 11225,
"preview": "original file\n-----------------------------------\nvar test = \"123 456\";\n\nif ((test.match(/\\d+/g)[0]) / (test.match(/\\d+/"
},
{
"path": "tests/baselines/Issue445.baseline.txt",
"chars": 5778,
"preview": "original file\n-----------------------------------\n/**\n * My awesome function.\n * @param {{id: string, name: string}} obj"
},
{
"path": "tests/baselines/Issue450.baseline.txt",
"chars": 2529,
"preview": "original file\n-----------------------------------\n// @onlyOwnGrammar - As this has type assertion\nlet a = true ? <number"
},
{
"path": "tests/baselines/Issue452.baseline.txt",
"chars": 3219,
"preview": "original file\n-----------------------------------\nclass Test<A, B>{}\nclass Favorite extends Test<\n string | number,\n u"
},
{
"path": "tests/baselines/Issue453.baseline.txt",
"chars": 12480,
"preview": "original file\n-----------------------------------\ntype Resolve = () => number;\n\nclass Test {\n first(values: Map<string,"
},
{
"path": "tests/baselines/Issue455.baseline.txt",
"chars": 2851,
"preview": "original file\n-----------------------------------\nfunc(function () // }\n{\n if (false)\n return 1\n else\n "
},
{
"path": "tests/baselines/Issue458.baseline.txt",
"chars": 3219,
"preview": "original file\n-----------------------------------\nexport class Blah {\n get () {}\n}\nconst x = {\n get () {}\n}\n----------"
},
{
"path": "tests/baselines/Issue460.baseline.txt",
"chars": 625,
"preview": "original file\n-----------------------------------\n// single-line comment\n/* multi-line comment */\n----------------------"
},
{
"path": "tests/baselines/Issue461.baseline.txt",
"chars": 16830,
"preview": "original file\n-----------------------------------\n// @onlyOwnGrammar - As this has jsx\nclass Foo {\n renderProgress = ()"
},
{
"path": "tests/baselines/Issue463.baseline.txt",
"chars": 1091,
"preview": "original file\n-----------------------------------\nconst x =\n 1\nif (x) return x\n-----------------------------------\n\nG"
},
{
"path": "tests/baselines/Issue466.baseline.txt",
"chars": 2465,
"preview": "original file\n-----------------------------------\nfunction foo(this: number, x: number) {\n\n}\n---------------------------"
},
{
"path": "tests/baselines/Issue468.baseline.txt",
"chars": 1824,
"preview": "original file\n-----------------------------------\n({ 'foo\\'': 'bar' })\n-----------------------------------\n\nGrammar: Typ"
},
{
"path": "tests/baselines/Issue470.baseline.txt",
"chars": 1588,
"preview": "original file\n-----------------------------------\nvar x = await import(\"./file1\");\n-----------------------------------\n\n"
},
{
"path": "tests/baselines/Issue471.baseline.txt",
"chars": 3170,
"preview": "original file\n-----------------------------------\nconst foo =\n true || `${'hello'}.txt`\n\nfunction syntaxHighlightingI"
}
]
// ... and 762 more files (download for full content)
About this extraction
This page contains the full source code of the microsoft/TypeScript-TmLanguage GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 962 files (7.5 MB), approximately 2.0M tokens, and a symbol index with 685 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.