* Branching visitor, visits a TypeScript syntax node. * * @param node The node to visit.
(node)
| 91839 | * @param node The node to visit. |
| 91840 | */ |
| 91841 | function visitTypeScript(node) { |
| 91842 | if (ts.isStatement(node) && ts.hasSyntacticModifier(node, 2 /* ModifierFlags.Ambient */)) { |
| 91843 | // TypeScript ambient declarations are elided, but some comments may be preserved. |
| 91844 | // See the implementation of `getLeadingComments` in comments.ts for more details. |
| 91845 | return factory.createNotEmittedStatement(node); |
| 91846 | } |
| 91847 | switch (node.kind) { |
| 91848 | case 93 /* SyntaxKind.ExportKeyword */: |
| 91849 | case 88 /* SyntaxKind.DefaultKeyword */: |
| 91850 | // ES6 export and default modifiers are elided when inside a namespace. |
| 91851 | return currentNamespace ? undefined : node; |
| 91852 | case 123 /* SyntaxKind.PublicKeyword */: |
| 91853 | case 121 /* SyntaxKind.PrivateKeyword */: |
| 91854 | case 122 /* SyntaxKind.ProtectedKeyword */: |
| 91855 | case 126 /* SyntaxKind.AbstractKeyword */: |
| 91856 | case 159 /* SyntaxKind.OverrideKeyword */: |
| 91857 | case 85 /* SyntaxKind.ConstKeyword */: |
| 91858 | case 135 /* SyntaxKind.DeclareKeyword */: |
| 91859 | case 145 /* SyntaxKind.ReadonlyKeyword */: |
| 91860 | case 101 /* SyntaxKind.InKeyword */: |
| 91861 | case 144 /* SyntaxKind.OutKeyword */: |
| 91862 | // TypeScript accessibility and readonly modifiers are elided |
| 91863 | // falls through |
| 91864 | case 183 /* SyntaxKind.ArrayType */: |
| 91865 | case 184 /* SyntaxKind.TupleType */: |
| 91866 | case 185 /* SyntaxKind.OptionalType */: |
| 91867 | case 186 /* SyntaxKind.RestType */: |
| 91868 | case 182 /* SyntaxKind.TypeLiteral */: |
| 91869 | case 177 /* SyntaxKind.TypePredicate */: |
| 91870 | case 163 /* SyntaxKind.TypeParameter */: |
| 91871 | case 130 /* SyntaxKind.AnyKeyword */: |
| 91872 | case 155 /* SyntaxKind.UnknownKeyword */: |
| 91873 | case 133 /* SyntaxKind.BooleanKeyword */: |
| 91874 | case 150 /* SyntaxKind.StringKeyword */: |
| 91875 | case 147 /* SyntaxKind.NumberKeyword */: |
| 91876 | case 143 /* SyntaxKind.NeverKeyword */: |
| 91877 | case 114 /* SyntaxKind.VoidKeyword */: |
| 91878 | case 151 /* SyntaxKind.SymbolKeyword */: |
| 91879 | case 180 /* SyntaxKind.ConstructorType */: |
| 91880 | case 179 /* SyntaxKind.FunctionType */: |
| 91881 | case 181 /* SyntaxKind.TypeQuery */: |
| 91882 | case 178 /* SyntaxKind.TypeReference */: |
| 91883 | case 187 /* SyntaxKind.UnionType */: |
| 91884 | case 188 /* SyntaxKind.IntersectionType */: |
| 91885 | case 189 /* SyntaxKind.ConditionalType */: |
| 91886 | case 191 /* SyntaxKind.ParenthesizedType */: |
| 91887 | case 192 /* SyntaxKind.ThisType */: |
| 91888 | case 193 /* SyntaxKind.TypeOperator */: |
| 91889 | case 194 /* SyntaxKind.IndexedAccessType */: |
| 91890 | case 195 /* SyntaxKind.MappedType */: |
| 91891 | case 196 /* SyntaxKind.LiteralType */: |
| 91892 | // TypeScript type nodes are elided. |
| 91893 | // falls through |
| 91894 | case 176 /* SyntaxKind.IndexSignature */: |
| 91895 | // TypeScript index signatures are elided. |
| 91896 | // falls through |
| 91897 | case 165 /* SyntaxKind.Decorator */: |
| 91898 | // TypeScript decorators are elided. They will be emitted as part of visitClassDeclaration. |
no test coverage detected
searching dependent graphs…