typescript 7.0.1-rc → 7.1.0-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE.txt +5 -36
- package/README.md +39 -14
- package/dist/api/async/api.d.ts +827 -123
- package/dist/api/async/api.d.ts.map +1 -1
- package/dist/api/async/api.js +2367 -340
- package/dist/api/async/api.js.map +1 -1
- package/dist/api/async/client.d.ts +35 -2
- package/dist/api/async/client.d.ts.map +1 -1
- package/dist/api/async/client.js +317 -59
- package/dist/api/async/client.js.map +1 -1
- package/dist/api/async/types.d.ts +199 -53
- package/dist/api/async/types.d.ts.map +1 -1
- package/dist/api/compilerOptions.generated.d.ts +123 -0
- package/dist/api/compilerOptions.generated.d.ts.map +1 -0
- package/dist/api/compilerOptions.generated.js +8 -0
- package/dist/api/compilerOptions.generated.js.map +1 -0
- package/dist/api/diagnosticFormatter.d.ts +9 -0
- package/dist/api/diagnosticFormatter.d.ts.map +1 -0
- package/dist/api/diagnosticFormatter.js +169 -0
- package/dist/api/diagnosticFormatter.js.map +1 -0
- package/dist/api/fs.d.ts +68 -13
- package/dist/api/fs.d.ts.map +1 -1
- package/dist/api/fs.js +62 -101
- package/dist/api/fs.js.map +1 -1
- package/dist/api/fsCallbacks.d.ts +27 -0
- package/dist/api/fsCallbacks.d.ts.map +1 -0
- package/dist/api/fsCallbacks.js +111 -0
- package/dist/api/fsCallbacks.js.map +1 -0
- package/dist/api/node/encoder.d.ts +3 -0
- package/dist/api/node/encoder.d.ts.map +1 -1
- package/dist/api/node/encoder.generated.js +2 -2
- package/dist/api/node/encoder.generated.js.map +1 -1
- package/dist/api/node/encoder.js +21 -33
- package/dist/api/node/encoder.js.map +1 -1
- package/dist/api/node/msgpack.d.ts.map +1 -1
- package/dist/api/node/msgpack.js +3 -3
- package/dist/api/node/msgpack.js.map +1 -1
- package/dist/api/node/node.d.ts +43 -10
- package/dist/api/node/node.d.ts.map +1 -1
- package/dist/api/node/node.generated.d.ts +20 -2
- package/dist/api/node/node.generated.d.ts.map +1 -1
- package/dist/api/node/node.generated.js +122 -52
- package/dist/api/node/node.generated.js.map +1 -1
- package/dist/api/node/node.infrastructure.d.ts +16 -3
- package/dist/api/node/node.infrastructure.d.ts.map +1 -1
- package/dist/api/node/node.infrastructure.js +20 -40
- package/dist/api/node/node.infrastructure.js.map +1 -1
- package/dist/api/node/node.js +269 -30
- package/dist/api/node/node.js.map +1 -1
- package/dist/api/node/protocol.d.ts +5 -2
- package/dist/api/node/protocol.d.ts.map +1 -1
- package/dist/api/node/protocol.generated.js +2 -2
- package/dist/api/node/protocol.generated.js.map +1 -1
- package/dist/api/node/protocol.js +5 -2
- package/dist/api/node/protocol.js.map +1 -1
- package/dist/api/node/wtf8.d.ts +10 -0
- package/dist/api/node/wtf8.d.ts.map +1 -0
- package/dist/api/node/wtf8.js +130 -0
- package/dist/api/node/wtf8.js.map +1 -0
- package/dist/api/options.d.ts +26 -6
- package/dist/api/options.d.ts.map +1 -1
- package/dist/api/options.js +21 -0
- package/dist/api/options.js.map +1 -1
- package/dist/api/path.d.ts +49 -39
- package/dist/api/path.d.ts.map +1 -1
- package/dist/api/path.js +409 -33
- package/dist/api/path.js.map +1 -1
- package/dist/api/prepareCompilerOptions.generated.d.ts +5 -0
- package/dist/api/prepareCompilerOptions.generated.d.ts.map +1 -0
- package/dist/api/prepareCompilerOptions.generated.js +24 -0
- package/dist/api/prepareCompilerOptions.generated.js.map +1 -0
- package/dist/api/proto.d.ts +58 -164
- package/dist/api/proto.d.ts.map +1 -1
- package/dist/api/proto.generated.d.ts +1419 -0
- package/dist/api/proto.generated.d.ts.map +1 -0
- package/dist/api/proto.generated.js +21 -0
- package/dist/api/proto.generated.js.map +1 -0
- package/dist/api/proto.js +28 -0
- package/dist/api/proto.js.map +1 -1
- package/dist/api/sourceFileCache.d.ts +51 -20
- package/dist/api/sourceFileCache.d.ts.map +1 -1
- package/dist/api/sourceFileCache.js +168 -37
- package/dist/api/sourceFileCache.js.map +1 -1
- package/dist/api/sync/api.d.ts +1553 -179
- package/dist/api/sync/api.d.ts.map +1 -1
- package/dist/api/sync/api.js +5086 -758
- package/dist/api/sync/api.js.map +1 -1
- package/dist/api/sync/client.d.ts +25 -2
- package/dist/api/sync/client.d.ts.map +1 -1
- package/dist/api/sync/client.js +132 -30
- package/dist/api/sync/client.js.map +1 -1
- package/dist/api/sync/generatorSupport.d.ts +32 -0
- package/dist/api/sync/generatorSupport.d.ts.map +1 -0
- package/dist/api/sync/generatorSupport.js +338 -0
- package/dist/api/sync/generatorSupport.js.map +1 -0
- package/dist/api/sync/types.d.ts +341 -68
- package/dist/api/sync/types.d.ts.map +1 -1
- package/dist/api/syncChannel.d.ts +7 -1
- package/dist/api/syncChannel.d.ts.map +1 -1
- package/dist/api/syncChannel.js +41 -3
- package/dist/api/syncChannel.js.map +1 -1
- package/dist/api/timing.d.ts +175 -0
- package/dist/api/timing.d.ts.map +1 -0
- package/dist/api/timing.js +149 -0
- package/dist/api/timing.js.map +1 -0
- package/dist/api/timingDump.d.ts +13 -0
- package/dist/api/timingDump.d.ts.map +1 -0
- package/dist/api/timingDump.js +38 -0
- package/dist/api/timingDump.js.map +1 -0
- package/dist/api/typedPaths.d.ts +3 -0
- package/dist/api/typedPaths.d.ts.map +1 -0
- package/dist/api/typedPaths.js +2 -0
- package/dist/api/typedPaths.js.map +1 -0
- package/dist/api/userPreferences.generated.d.ts +195 -0
- package/dist/api/userPreferences.generated.d.ts.map +1 -0
- package/dist/api/userPreferences.generated.js +3 -0
- package/dist/api/userPreferences.generated.js.map +1 -0
- package/dist/ast/ast.d.ts +125 -8
- package/dist/ast/ast.d.ts.map +1 -1
- package/dist/ast/ast.generated.d.ts +48 -42
- package/dist/ast/ast.generated.d.ts.map +1 -1
- package/dist/ast/ast.generated.js +1 -1
- package/dist/ast/ast.generated.js.map +1 -1
- package/dist/ast/ast.js +1 -0
- package/dist/ast/ast.js.map +1 -1
- package/dist/ast/astnav.d.ts +3 -2
- package/dist/ast/astnav.d.ts.map +1 -1
- package/dist/ast/astnav.js +148 -3
- package/dist/ast/astnav.js.map +1 -1
- package/dist/ast/factory.generated.d.ts +12 -150
- package/dist/ast/factory.generated.d.ts.map +1 -1
- package/dist/ast/factory.generated.js +2736 -8
- package/dist/ast/factory.generated.js.map +1 -1
- package/dist/ast/index.d.ts +7 -0
- package/dist/ast/index.d.ts.map +1 -1
- package/dist/ast/index.js +7 -0
- package/dist/ast/index.js.map +1 -1
- package/dist/ast/is.d.ts +3 -12
- package/dist/ast/is.d.ts.map +1 -1
- package/dist/ast/is.generated.d.ts +890 -2
- package/dist/ast/is.generated.d.ts.map +1 -1
- package/dist/ast/is.generated.js +303 -7
- package/dist/ast/is.generated.js.map +1 -1
- package/dist/ast/is.js +231 -1
- package/dist/ast/is.js.map +1 -1
- package/dist/ast/jsdoc.d.ts +12 -0
- package/dist/ast/jsdoc.d.ts.map +1 -0
- package/dist/ast/jsdoc.js +208 -0
- package/dist/ast/jsdoc.js.map +1 -0
- package/dist/ast/modifiers.d.ts +4 -0
- package/dist/ast/modifiers.d.ts.map +1 -0
- package/dist/ast/modifiers.js +41 -0
- package/dist/ast/modifiers.js.map +1 -0
- package/dist/ast/scanner.d.ts.map +1 -1
- package/dist/ast/scanner.js +2 -1
- package/dist/ast/scanner.js.map +1 -1
- package/dist/ast/spanMap.d.ts +88 -0
- package/dist/ast/spanMap.d.ts.map +1 -0
- package/dist/ast/spanMap.js +417 -0
- package/dist/ast/spanMap.js.map +1 -0
- package/dist/ast/utils.d.ts +25 -0
- package/dist/ast/utils.d.ts.map +1 -1
- package/dist/ast/utils.js +291 -0
- package/dist/ast/utils.js.map +1 -1
- package/dist/ast/visitor.d.ts +2 -0
- package/dist/ast/visitor.d.ts.map +1 -1
- package/dist/ast/visitor.generated.d.ts.map +1 -1
- package/dist/ast/visitor.generated.js +5 -4
- package/dist/ast/visitor.generated.js.map +1 -1
- package/dist/ast/visitor.js +40 -0
- package/dist/ast/visitor.js.map +1 -1
- package/dist/enums/caseSensitivity.d.ts +2 -0
- package/dist/enums/caseSensitivity.d.ts.map +1 -0
- package/dist/enums/caseSensitivity.enum.d.ts +5 -0
- package/dist/enums/caseSensitivity.enum.d.ts.map +1 -0
- package/dist/enums/caseSensitivity.enum.js +7 -0
- package/dist/enums/caseSensitivity.enum.js.map +1 -0
- package/dist/enums/caseSensitivity.js +7 -0
- package/dist/enums/caseSensitivity.js.map +1 -0
- package/dist/enums/checkFlags.d.ts +2 -0
- package/dist/enums/checkFlags.d.ts.map +1 -0
- package/dist/enums/checkFlags.enum.d.ts +34 -0
- package/dist/enums/checkFlags.enum.d.ts.map +1 -0
- package/dist/enums/checkFlags.enum.js +36 -0
- package/dist/enums/checkFlags.enum.js.map +1 -0
- package/dist/enums/checkFlags.js +36 -0
- package/dist/enums/checkFlags.js.map +1 -0
- package/dist/enums/completionItemKind.enum.js +1 -1
- package/dist/enums/completionItemKind.enum.js.map +1 -1
- package/dist/enums/completionItemKind.js +1 -1
- package/dist/enums/completionItemKind.js.map +1 -1
- package/dist/enums/diagnosticCategory.enum.js +1 -1
- package/dist/enums/diagnosticCategory.enum.js.map +1 -1
- package/dist/enums/diagnosticCategory.js +1 -1
- package/dist/enums/diagnosticCategory.js.map +1 -1
- package/dist/enums/diagnosticDirectivePolicy.d.ts +2 -0
- package/dist/enums/diagnosticDirectivePolicy.d.ts.map +1 -0
- package/dist/enums/diagnosticDirectivePolicy.enum.d.ts +5 -0
- package/dist/enums/diagnosticDirectivePolicy.enum.d.ts.map +1 -0
- package/dist/enums/diagnosticDirectivePolicy.enum.js +7 -0
- package/dist/enums/diagnosticDirectivePolicy.enum.js.map +1 -0
- package/dist/enums/diagnosticDirectivePolicy.js +7 -0
- package/dist/enums/diagnosticDirectivePolicy.js.map +1 -0
- package/dist/enums/elementFlags.enum.js +1 -1
- package/dist/enums/elementFlags.enum.js.map +1 -1
- package/dist/enums/elementFlags.js +1 -1
- package/dist/enums/elementFlags.js.map +1 -1
- package/dist/enums/emitOnly.d.ts +2 -0
- package/dist/enums/emitOnly.d.ts.map +1 -0
- package/dist/enums/emitOnly.enum.d.ts +6 -0
- package/dist/enums/emitOnly.enum.d.ts.map +1 -0
- package/dist/enums/emitOnly.enum.js +8 -0
- package/dist/enums/emitOnly.enum.js.map +1 -0
- package/dist/enums/emitOnly.js +8 -0
- package/dist/enums/emitOnly.js.map +1 -0
- package/dist/enums/indexKind.d.ts +2 -0
- package/dist/enums/indexKind.d.ts.map +1 -0
- package/dist/enums/indexKind.enum.d.ts +5 -0
- package/dist/enums/indexKind.enum.d.ts.map +1 -0
- package/dist/enums/indexKind.enum.js +7 -0
- package/dist/enums/indexKind.enum.js.map +1 -0
- package/dist/enums/indexKind.js +7 -0
- package/dist/enums/indexKind.js.map +1 -0
- package/dist/enums/internalSymbolName.d.ts +2 -0
- package/dist/enums/internalSymbolName.d.ts.map +1 -0
- package/dist/enums/internalSymbolName.enum.d.ts +23 -0
- package/dist/enums/internalSymbolName.enum.d.ts.map +1 -0
- package/dist/enums/internalSymbolName.enum.js +25 -0
- package/dist/enums/internalSymbolName.enum.js.map +1 -0
- package/dist/enums/internalSymbolName.js +25 -0
- package/dist/enums/internalSymbolName.js.map +1 -0
- package/dist/enums/jsDeclarationKind.d.ts +2 -0
- package/dist/enums/jsDeclarationKind.d.ts.map +1 -0
- package/dist/enums/jsDeclarationKind.enum.d.ts +10 -0
- package/dist/enums/jsDeclarationKind.enum.d.ts.map +1 -0
- package/dist/enums/jsDeclarationKind.enum.js +12 -0
- package/dist/enums/jsDeclarationKind.enum.js.map +1 -0
- package/dist/enums/jsDeclarationKind.js +12 -0
- package/dist/enums/jsDeclarationKind.js.map +1 -0
- package/dist/enums/jsxEmit.d.ts +2 -0
- package/dist/enums/jsxEmit.d.ts.map +1 -0
- package/dist/enums/jsxEmit.enum.d.ts +9 -0
- package/dist/enums/jsxEmit.enum.d.ts.map +1 -0
- package/dist/enums/jsxEmit.enum.js +11 -0
- package/dist/enums/jsxEmit.enum.js.map +1 -0
- package/dist/enums/jsxEmit.js +11 -0
- package/dist/enums/jsxEmit.js.map +1 -0
- package/dist/enums/modifierFlags.enum.js +1 -1
- package/dist/enums/modifierFlags.enum.js.map +1 -1
- package/dist/enums/modifierFlags.js +1 -1
- package/dist/enums/modifierFlags.js.map +1 -1
- package/dist/enums/moduleDetectionKind.d.ts +2 -0
- package/dist/enums/moduleDetectionKind.d.ts.map +1 -0
- package/dist/enums/moduleDetectionKind.enum.d.ts +7 -0
- package/dist/enums/moduleDetectionKind.enum.d.ts.map +1 -0
- package/dist/enums/moduleDetectionKind.enum.js +9 -0
- package/dist/enums/moduleDetectionKind.enum.js.map +1 -0
- package/dist/enums/moduleDetectionKind.js +9 -0
- package/dist/enums/moduleDetectionKind.js.map +1 -0
- package/dist/enums/moduleKind.d.ts +2 -0
- package/dist/enums/moduleKind.d.ts.map +1 -0
- package/dist/enums/moduleKind.enum.d.ts +17 -0
- package/dist/enums/moduleKind.enum.d.ts.map +1 -0
- package/dist/enums/moduleKind.enum.js +19 -0
- package/dist/enums/moduleKind.enum.js.map +1 -0
- package/dist/enums/moduleKind.js +19 -0
- package/dist/enums/moduleKind.js.map +1 -0
- package/dist/enums/moduleResolutionKind.d.ts +2 -0
- package/dist/enums/moduleResolutionKind.d.ts.map +1 -0
- package/dist/enums/moduleResolutionKind.enum.d.ts +9 -0
- package/dist/enums/moduleResolutionKind.enum.d.ts.map +1 -0
- package/dist/enums/moduleResolutionKind.enum.js +11 -0
- package/dist/enums/moduleResolutionKind.enum.js.map +1 -0
- package/dist/enums/moduleResolutionKind.js +11 -0
- package/dist/enums/moduleResolutionKind.js.map +1 -0
- package/dist/enums/newLineKind.d.ts +2 -0
- package/dist/enums/newLineKind.d.ts.map +1 -0
- package/dist/enums/newLineKind.enum.d.ts +6 -0
- package/dist/enums/newLineKind.enum.d.ts.map +1 -0
- package/dist/enums/newLineKind.enum.js +8 -0
- package/dist/enums/newLineKind.enum.js.map +1 -0
- package/dist/enums/newLineKind.js +8 -0
- package/dist/enums/newLineKind.js.map +1 -0
- package/dist/enums/nodeBuilderFlags.enum.js +1 -1
- package/dist/enums/nodeBuilderFlags.enum.js.map +1 -1
- package/dist/enums/nodeBuilderFlags.js +1 -1
- package/dist/enums/nodeBuilderFlags.js.map +1 -1
- package/dist/enums/nodeFlags.enum.js +1 -1
- package/dist/enums/nodeFlags.enum.js.map +1 -1
- package/dist/enums/nodeFlags.js +1 -1
- package/dist/enums/nodeFlags.js.map +1 -1
- package/dist/enums/objectFlags.enum.d.ts +3 -2
- package/dist/enums/objectFlags.enum.d.ts.map +1 -1
- package/dist/enums/objectFlags.enum.js +4 -3
- package/dist/enums/objectFlags.enum.js.map +1 -1
- package/dist/enums/objectFlags.js +4 -3
- package/dist/enums/objectFlags.js.map +1 -1
- package/dist/enums/outerExpressionKinds.enum.d.ts +5 -1
- package/dist/enums/outerExpressionKinds.enum.d.ts.map +1 -1
- package/dist/enums/outerExpressionKinds.enum.js +5 -1
- package/dist/enums/outerExpressionKinds.enum.js.map +1 -1
- package/dist/enums/outerExpressionKinds.js +5 -1
- package/dist/enums/outerExpressionKinds.js.map +1 -1
- package/dist/enums/scriptKind.d.ts.map +1 -1
- package/dist/enums/scriptKind.enum.d.ts +1 -3
- package/dist/enums/scriptKind.enum.d.ts.map +1 -1
- package/dist/enums/scriptKind.enum.js +1 -2
- package/dist/enums/scriptKind.enum.js.map +1 -1
- package/dist/enums/scriptKind.js +1 -2
- package/dist/enums/scriptKind.js.map +1 -1
- package/dist/enums/scriptTarget.d.ts.map +1 -1
- package/dist/enums/scriptTarget.enum.d.ts +1 -0
- package/dist/enums/scriptTarget.enum.d.ts.map +1 -1
- package/dist/enums/scriptTarget.enum.js +2 -0
- package/dist/enums/scriptTarget.enum.js.map +1 -1
- package/dist/enums/scriptTarget.js +2 -0
- package/dist/enums/scriptTarget.js.map +1 -1
- package/dist/enums/signatureFlags.enum.js +1 -1
- package/dist/enums/signatureFlags.enum.js.map +1 -1
- package/dist/enums/signatureFlags.js +1 -1
- package/dist/enums/signatureFlags.js.map +1 -1
- package/dist/enums/signatureKind.enum.js +1 -1
- package/dist/enums/signatureKind.enum.js.map +1 -1
- package/dist/enums/signatureKind.js +1 -1
- package/dist/enums/signatureKind.js.map +1 -1
- package/dist/enums/spanMapFeature.d.ts +2 -0
- package/dist/enums/spanMapFeature.d.ts.map +1 -0
- package/dist/enums/spanMapFeature.enum.d.ts +25 -0
- package/dist/enums/spanMapFeature.enum.d.ts.map +1 -0
- package/dist/enums/spanMapFeature.enum.js +27 -0
- package/dist/enums/spanMapFeature.enum.js.map +1 -0
- package/dist/enums/spanMapFeature.js +27 -0
- package/dist/enums/spanMapFeature.js.map +1 -0
- package/dist/enums/spanMapFidelity.d.ts +2 -0
- package/dist/enums/spanMapFidelity.d.ts.map +1 -0
- package/dist/enums/spanMapFidelity.enum.d.ts +7 -0
- package/dist/enums/spanMapFidelity.enum.d.ts.map +1 -0
- package/dist/enums/spanMapFidelity.enum.js +9 -0
- package/dist/enums/spanMapFidelity.enum.js.map +1 -0
- package/dist/enums/spanMapFidelity.js +9 -0
- package/dist/enums/spanMapFidelity.js.map +1 -0
- package/dist/enums/spanMapKind.d.ts +2 -0
- package/dist/enums/spanMapKind.d.ts.map +1 -0
- package/dist/enums/spanMapKind.enum.d.ts +6 -0
- package/dist/enums/spanMapKind.enum.d.ts.map +1 -0
- package/dist/enums/spanMapKind.enum.js +8 -0
- package/dist/enums/spanMapKind.enum.js.map +1 -0
- package/dist/enums/spanMapKind.js +8 -0
- package/dist/enums/spanMapKind.js.map +1 -0
- package/dist/enums/symbolFlags.enum.d.ts +1 -2
- package/dist/enums/symbolFlags.enum.d.ts.map +1 -1
- package/dist/enums/symbolFlags.enum.js +2 -3
- package/dist/enums/symbolFlags.enum.js.map +1 -1
- package/dist/enums/symbolFlags.js +2 -3
- package/dist/enums/symbolFlags.js.map +1 -1
- package/dist/enums/symbolOwnerKind.d.ts +2 -0
- package/dist/enums/symbolOwnerKind.d.ts.map +1 -0
- package/dist/enums/symbolOwnerKind.enum.d.ts +5 -0
- package/dist/enums/symbolOwnerKind.enum.d.ts.map +1 -0
- package/dist/enums/symbolOwnerKind.enum.js +7 -0
- package/dist/enums/symbolOwnerKind.enum.js.map +1 -0
- package/dist/enums/symbolOwnerKind.js +7 -0
- package/dist/enums/symbolOwnerKind.js.map +1 -0
- package/dist/enums/syntaxKind.enum.d.ts +198 -197
- package/dist/enums/syntaxKind.enum.d.ts.map +1 -1
- package/dist/enums/syntaxKind.enum.js +199 -198
- package/dist/enums/syntaxKind.enum.js.map +1 -1
- package/dist/enums/syntaxKind.js +199 -198
- package/dist/enums/syntaxKind.js.map +1 -1
- package/dist/enums/tokenFlags.enum.js +1 -1
- package/dist/enums/tokenFlags.enum.js.map +1 -1
- package/dist/enums/tokenFlags.js +1 -1
- package/dist/enums/tokenFlags.js.map +1 -1
- package/dist/enums/typeFlags.enum.js +1 -1
- package/dist/enums/typeFlags.enum.js.map +1 -1
- package/dist/enums/typeFlags.js +1 -1
- package/dist/enums/typeFlags.js.map +1 -1
- package/dist/enums/typeFormatFlags.d.ts +2 -0
- package/dist/enums/typeFormatFlags.d.ts.map +1 -0
- package/dist/enums/typeFormatFlags.enum.d.ts +29 -0
- package/dist/enums/typeFormatFlags.enum.d.ts.map +1 -0
- package/dist/enums/typeFormatFlags.enum.js +31 -0
- package/dist/enums/typeFormatFlags.enum.js.map +1 -0
- package/dist/enums/typeFormatFlags.js +31 -0
- package/dist/enums/typeFormatFlags.js.map +1 -0
- package/dist/enums/typePredicateKind.enum.js +1 -1
- package/dist/enums/typePredicateKind.enum.js.map +1 -1
- package/dist/enums/typePredicateKind.js +1 -1
- package/dist/enums/typePredicateKind.js.map +1 -1
- package/dist/internal/utils.d.ts +23 -0
- package/dist/internal/utils.d.ts.map +1 -0
- package/dist/internal/utils.js +25 -0
- package/dist/internal/utils.js.map +1 -0
- package/dist/vscode/extensionApi.d.ts +101 -0
- package/dist/vscode/extensionApi.d.ts.map +1 -0
- package/dist/vscode/extensionApi.js +2 -0
- package/dist/vscode/extensionApi.js.map +1 -0
- package/dist/vscode/moduleLoader.d.ts +14 -0
- package/dist/vscode/moduleLoader.d.ts.map +1 -0
- package/dist/vscode/moduleLoader.js +36 -0
- package/dist/vscode/moduleLoader.js.map +1 -0
- package/dist/vscode/protocol.generated.d.ts +2886 -0
- package/dist/vscode/protocol.generated.d.ts.map +1 -0
- package/dist/vscode/protocol.generated.js +4 -0
- package/dist/vscode/protocol.generated.js.map +1 -0
- package/lib/getExePath.js +8 -5
- package/lib/tsc.js +1 -1
- package/lib/version.cjs +3 -0
- package/lib/version.d.cts +2 -0
- package/package.json +48 -41
- package/schemas/jsconfig.schema.json +2207 -0
- package/schemas/tsconfig.schema.json +2206 -0
- package/vendor/vscode-jsonrpc/lib/node/main.js +1 -1
- package/vendor/vscode-jsonrpc/package.json +1 -1
- package/dist/api/objectRegistry.d.ts +0 -40
- package/dist/api/objectRegistry.d.ts.map +0 -1
- package/dist/api/objectRegistry.js +0 -61
- package/dist/api/objectRegistry.js.map +0 -1
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
// Code generated by
|
|
1
|
+
// Code generated by tools/scripts/tsc/generate-ts-ast.ts. DO NOT EDIT.
|
|
2
2
|
import { NodeFlags } from "#enums/nodeFlags";
|
|
3
3
|
import { SyntaxKind } from "#enums/syntaxKind";
|
|
4
4
|
import { TokenFlags } from "#enums/tokenFlags";
|
|
5
|
-
import {
|
|
5
|
+
import { getChildren, getFirstToken, getLastToken, getTokenPosOfNode, } from "./astnav.js";
|
|
6
|
+
import { cloneSourceFileData } from "./utils.js";
|
|
7
|
+
import { forEachChildOfJSDocParameterTag, forEachChildOfJSDocPropertyTag, yieldEachChildOfJSDocParameterTag, yieldEachChildOfJSDocPropertyTag, } from "./visitor.js";
|
|
8
|
+
/** @internal */
|
|
6
9
|
export class NodeObject {
|
|
7
10
|
kind;
|
|
8
11
|
flags = 0;
|
|
@@ -44,6 +47,9 @@ export class NodeObject {
|
|
|
44
47
|
get body() {
|
|
45
48
|
return this._data?.body;
|
|
46
49
|
}
|
|
50
|
+
get canonicalSourceFileName() {
|
|
51
|
+
return this._data?.canonicalSourceFileName;
|
|
52
|
+
}
|
|
47
53
|
get caseBlock() {
|
|
48
54
|
return this._data?.caseBlock;
|
|
49
55
|
}
|
|
@@ -83,6 +89,9 @@ export class NodeObject {
|
|
|
83
89
|
get containsOnlyTriviaWhiteSpaces() {
|
|
84
90
|
return this._data?.containsOnlyTriviaWhiteSpaces;
|
|
85
91
|
}
|
|
92
|
+
get contentMapper() {
|
|
93
|
+
return this._data?.contentMapper;
|
|
94
|
+
}
|
|
86
95
|
get declarationList() {
|
|
87
96
|
return this._data?.declarationList;
|
|
88
97
|
}
|
|
@@ -92,6 +101,9 @@ export class NodeObject {
|
|
|
92
101
|
get defaultType() {
|
|
93
102
|
return this._data?.defaultType;
|
|
94
103
|
}
|
|
104
|
+
get diagnosticDirectives() {
|
|
105
|
+
return this._data?.diagnosticDirectives;
|
|
106
|
+
}
|
|
95
107
|
get dotDotDotToken() {
|
|
96
108
|
return this._data?.dotDotDotToken;
|
|
97
109
|
}
|
|
@@ -263,6 +275,9 @@ export class NodeObject {
|
|
|
263
275
|
get operatorToken() {
|
|
264
276
|
return this._data?.operatorToken;
|
|
265
277
|
}
|
|
278
|
+
get originalText() {
|
|
279
|
+
return this._data?.originalText;
|
|
280
|
+
}
|
|
266
281
|
get parameterName() {
|
|
267
282
|
return this._data?.parameterName;
|
|
268
283
|
}
|
|
@@ -308,12 +323,18 @@ export class NodeObject {
|
|
|
308
323
|
get scriptKind() {
|
|
309
324
|
return this._data?.scriptKind;
|
|
310
325
|
}
|
|
326
|
+
get spanMap() {
|
|
327
|
+
return this._data?.spanMap;
|
|
328
|
+
}
|
|
311
329
|
get statement() {
|
|
312
330
|
return this._data?.statement;
|
|
313
331
|
}
|
|
314
332
|
get statements() {
|
|
315
333
|
return this._data?.statements;
|
|
316
334
|
}
|
|
335
|
+
get supplementalSourceFileNames() {
|
|
336
|
+
return this._data?.supplementalSourceFileNames;
|
|
337
|
+
}
|
|
317
338
|
get tag() {
|
|
318
339
|
return this._data?.tag;
|
|
319
340
|
}
|
|
@@ -389,6 +410,9 @@ export class NodeObject {
|
|
|
389
410
|
get variableDeclaration() {
|
|
390
411
|
return this._data?.variableDeclaration;
|
|
391
412
|
}
|
|
413
|
+
get virtualFileName() {
|
|
414
|
+
return this._data?.virtualFileName;
|
|
415
|
+
}
|
|
392
416
|
get whenFalse() {
|
|
393
417
|
return this._data?.whenFalse;
|
|
394
418
|
}
|
|
@@ -399,12 +423,56 @@ export class NodeObject {
|
|
|
399
423
|
const fn = forEachChildTable[this.kind];
|
|
400
424
|
return fn ? fn(this._data, visitor, visitArray) : undefined;
|
|
401
425
|
}
|
|
426
|
+
childrenIter() {
|
|
427
|
+
const fn = yieldEachChildTable[this.kind];
|
|
428
|
+
return fn ? fn(this._data) : emptyChildrenIter();
|
|
429
|
+
}
|
|
402
430
|
getSourceFile() {
|
|
403
431
|
let node = this;
|
|
404
432
|
while (node.parent)
|
|
405
433
|
node = node.parent;
|
|
406
434
|
return node;
|
|
407
435
|
}
|
|
436
|
+
getStart(sourceFile, includeJsDocComment) {
|
|
437
|
+
return getTokenPosOfNode(this, sourceFile ?? this.getSourceFile(), includeJsDocComment);
|
|
438
|
+
}
|
|
439
|
+
getFullStart() {
|
|
440
|
+
return this.pos;
|
|
441
|
+
}
|
|
442
|
+
getEnd() {
|
|
443
|
+
return this.end;
|
|
444
|
+
}
|
|
445
|
+
getWidth(sourceFile) {
|
|
446
|
+
return this.getEnd() - this.getStart(sourceFile);
|
|
447
|
+
}
|
|
448
|
+
getFullWidth() {
|
|
449
|
+
return this.end - this.pos;
|
|
450
|
+
}
|
|
451
|
+
getLeadingTriviaWidth(sourceFile) {
|
|
452
|
+
return this.getStart(sourceFile) - this.pos;
|
|
453
|
+
}
|
|
454
|
+
getFullText(sourceFile) {
|
|
455
|
+
return (sourceFile ?? this.getSourceFile()).text.substring(this.pos, this.end);
|
|
456
|
+
}
|
|
457
|
+
getText(sourceFile) {
|
|
458
|
+
sourceFile ??= this.getSourceFile();
|
|
459
|
+
return sourceFile.text.substring(this.getStart(sourceFile), this.end);
|
|
460
|
+
}
|
|
461
|
+
getChildCount(sourceFile) {
|
|
462
|
+
return this.getChildren(sourceFile).length;
|
|
463
|
+
}
|
|
464
|
+
getChildAt(index, sourceFile) {
|
|
465
|
+
return this.getChildren(sourceFile)[index];
|
|
466
|
+
}
|
|
467
|
+
getChildren(sourceFile) {
|
|
468
|
+
return getChildren(this, sourceFile ?? this.getSourceFile());
|
|
469
|
+
}
|
|
470
|
+
getFirstToken(sourceFile) {
|
|
471
|
+
return getFirstToken(this, sourceFile ?? this.getSourceFile());
|
|
472
|
+
}
|
|
473
|
+
getLastToken(sourceFile) {
|
|
474
|
+
return getLastToken(this, sourceFile ?? this.getSourceFile());
|
|
475
|
+
}
|
|
408
476
|
}
|
|
409
477
|
function isNodeArray(array) {
|
|
410
478
|
return "pos" in array && "end" in array;
|
|
@@ -753,7 +821,7 @@ function cloneNodeData(node) {
|
|
|
753
821
|
case SyntaxKind.JSDocNameReference:
|
|
754
822
|
return { name: n.name };
|
|
755
823
|
case SyntaxKind.ModuleDeclaration:
|
|
756
|
-
return { modifiers: n.modifiers, keyword: n.keyword, name: n.name, body: n.body };
|
|
824
|
+
return { modifiers: n.modifiers, keyword: n.keyword, name: n.name, attributes: n.attributes, body: n.body };
|
|
757
825
|
case SyntaxKind.ImportEqualsDeclaration:
|
|
758
826
|
return { modifiers: n.modifiers, isTypeOnly: n.isTypeOnly, name: n.name, moduleReference: n.moduleReference };
|
|
759
827
|
case SyntaxKind.ExportDeclaration:
|
|
@@ -795,7 +863,7 @@ function cloneNodeData(node) {
|
|
|
795
863
|
case SyntaxKind.JSDocPropertyTag:
|
|
796
864
|
return { tagName: n.tagName, name: n.name, isBracketed: n.isBracketed, typeExpression: n.typeExpression, isNameFirst: n.isNameFirst, comment: n.comment };
|
|
797
865
|
case SyntaxKind.SourceFile:
|
|
798
|
-
return
|
|
866
|
+
return cloneSourceFileData(n);
|
|
799
867
|
default:
|
|
800
868
|
return undefined;
|
|
801
869
|
}
|
|
@@ -1182,6 +1250,7 @@ const forEachChildTable = {
|
|
|
1182
1250
|
[SyntaxKind.JSDocNameReference]: (data, cbNode, cbNodes) => visitNode(cbNode, data.name),
|
|
1183
1251
|
[SyntaxKind.ModuleDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) ||
|
|
1184
1252
|
visitNode(cbNode, data.name) ||
|
|
1253
|
+
visitNode(cbNode, data.attributes) ||
|
|
1185
1254
|
visitNode(cbNode, data.body),
|
|
1186
1255
|
[SyntaxKind.ImportEqualsDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) ||
|
|
1187
1256
|
visitNode(cbNode, data.name) ||
|
|
@@ -1228,6 +1297,2652 @@ const forEachChildTable = {
|
|
|
1228
1297
|
[SyntaxKind.SourceFile]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.statements) ||
|
|
1229
1298
|
visitNode(cbNode, data.endOfFileToken),
|
|
1230
1299
|
};
|
|
1300
|
+
function* emptyChildrenIter() {
|
|
1301
|
+
return undefined;
|
|
1302
|
+
}
|
|
1303
|
+
const yieldEachChildTable = {
|
|
1304
|
+
[SyntaxKind.QualifiedName]: function* (data) {
|
|
1305
|
+
if (data.left) {
|
|
1306
|
+
const res = yield data.left;
|
|
1307
|
+
if (res)
|
|
1308
|
+
return res;
|
|
1309
|
+
}
|
|
1310
|
+
if (data.right) {
|
|
1311
|
+
const res = yield data.right;
|
|
1312
|
+
if (res)
|
|
1313
|
+
return res;
|
|
1314
|
+
}
|
|
1315
|
+
},
|
|
1316
|
+
[SyntaxKind.ComputedPropertyName]: function* (data) {
|
|
1317
|
+
if (data.expression) {
|
|
1318
|
+
const res = yield data.expression;
|
|
1319
|
+
if (res)
|
|
1320
|
+
return res;
|
|
1321
|
+
}
|
|
1322
|
+
},
|
|
1323
|
+
[SyntaxKind.Decorator]: function* (data) {
|
|
1324
|
+
if (data.expression) {
|
|
1325
|
+
const res = yield data.expression;
|
|
1326
|
+
if (res)
|
|
1327
|
+
return res;
|
|
1328
|
+
}
|
|
1329
|
+
},
|
|
1330
|
+
[SyntaxKind.IfStatement]: function* (data) {
|
|
1331
|
+
if (data.expression) {
|
|
1332
|
+
const res = yield data.expression;
|
|
1333
|
+
if (res)
|
|
1334
|
+
return res;
|
|
1335
|
+
}
|
|
1336
|
+
if (data.thenStatement) {
|
|
1337
|
+
const res = yield data.thenStatement;
|
|
1338
|
+
if (res)
|
|
1339
|
+
return res;
|
|
1340
|
+
}
|
|
1341
|
+
if (data.elseStatement) {
|
|
1342
|
+
const res = yield data.elseStatement;
|
|
1343
|
+
if (res)
|
|
1344
|
+
return res;
|
|
1345
|
+
}
|
|
1346
|
+
},
|
|
1347
|
+
[SyntaxKind.DoStatement]: function* (data) {
|
|
1348
|
+
if (data.statement) {
|
|
1349
|
+
const res = yield data.statement;
|
|
1350
|
+
if (res)
|
|
1351
|
+
return res;
|
|
1352
|
+
}
|
|
1353
|
+
if (data.expression) {
|
|
1354
|
+
const res = yield data.expression;
|
|
1355
|
+
if (res)
|
|
1356
|
+
return res;
|
|
1357
|
+
}
|
|
1358
|
+
},
|
|
1359
|
+
[SyntaxKind.WhileStatement]: function* (data) {
|
|
1360
|
+
if (data.expression) {
|
|
1361
|
+
const res = yield data.expression;
|
|
1362
|
+
if (res)
|
|
1363
|
+
return res;
|
|
1364
|
+
}
|
|
1365
|
+
if (data.statement) {
|
|
1366
|
+
const res = yield data.statement;
|
|
1367
|
+
if (res)
|
|
1368
|
+
return res;
|
|
1369
|
+
}
|
|
1370
|
+
},
|
|
1371
|
+
[SyntaxKind.ForStatement]: function* (data) {
|
|
1372
|
+
if (data.initializer) {
|
|
1373
|
+
const res = yield data.initializer;
|
|
1374
|
+
if (res)
|
|
1375
|
+
return res;
|
|
1376
|
+
}
|
|
1377
|
+
if (data.condition) {
|
|
1378
|
+
const res = yield data.condition;
|
|
1379
|
+
if (res)
|
|
1380
|
+
return res;
|
|
1381
|
+
}
|
|
1382
|
+
if (data.incrementor) {
|
|
1383
|
+
const res = yield data.incrementor;
|
|
1384
|
+
if (res)
|
|
1385
|
+
return res;
|
|
1386
|
+
}
|
|
1387
|
+
if (data.statement) {
|
|
1388
|
+
const res = yield data.statement;
|
|
1389
|
+
if (res)
|
|
1390
|
+
return res;
|
|
1391
|
+
}
|
|
1392
|
+
},
|
|
1393
|
+
[SyntaxKind.BreakStatement]: function* (data) {
|
|
1394
|
+
if (data.label) {
|
|
1395
|
+
const res = yield data.label;
|
|
1396
|
+
if (res)
|
|
1397
|
+
return res;
|
|
1398
|
+
}
|
|
1399
|
+
},
|
|
1400
|
+
[SyntaxKind.ContinueStatement]: function* (data) {
|
|
1401
|
+
if (data.label) {
|
|
1402
|
+
const res = yield data.label;
|
|
1403
|
+
if (res)
|
|
1404
|
+
return res;
|
|
1405
|
+
}
|
|
1406
|
+
},
|
|
1407
|
+
[SyntaxKind.ReturnStatement]: function* (data) {
|
|
1408
|
+
if (data.expression) {
|
|
1409
|
+
const res = yield data.expression;
|
|
1410
|
+
if (res)
|
|
1411
|
+
return res;
|
|
1412
|
+
}
|
|
1413
|
+
},
|
|
1414
|
+
[SyntaxKind.WithStatement]: function* (data) {
|
|
1415
|
+
if (data.expression) {
|
|
1416
|
+
const res = yield data.expression;
|
|
1417
|
+
if (res)
|
|
1418
|
+
return res;
|
|
1419
|
+
}
|
|
1420
|
+
if (data.statement) {
|
|
1421
|
+
const res = yield data.statement;
|
|
1422
|
+
if (res)
|
|
1423
|
+
return res;
|
|
1424
|
+
}
|
|
1425
|
+
},
|
|
1426
|
+
[SyntaxKind.SwitchStatement]: function* (data) {
|
|
1427
|
+
if (data.expression) {
|
|
1428
|
+
const res = yield data.expression;
|
|
1429
|
+
if (res)
|
|
1430
|
+
return res;
|
|
1431
|
+
}
|
|
1432
|
+
if (data.caseBlock) {
|
|
1433
|
+
const res = yield data.caseBlock;
|
|
1434
|
+
if (res)
|
|
1435
|
+
return res;
|
|
1436
|
+
}
|
|
1437
|
+
},
|
|
1438
|
+
[SyntaxKind.CaseBlock]: function* (data) {
|
|
1439
|
+
for (const n of data.clauses) {
|
|
1440
|
+
const res = yield n;
|
|
1441
|
+
if (res)
|
|
1442
|
+
return res;
|
|
1443
|
+
}
|
|
1444
|
+
},
|
|
1445
|
+
[SyntaxKind.ThrowStatement]: function* (data) {
|
|
1446
|
+
if (data.expression) {
|
|
1447
|
+
const res = yield data.expression;
|
|
1448
|
+
if (res)
|
|
1449
|
+
return res;
|
|
1450
|
+
}
|
|
1451
|
+
},
|
|
1452
|
+
[SyntaxKind.TryStatement]: function* (data) {
|
|
1453
|
+
if (data.tryBlock) {
|
|
1454
|
+
const res = yield data.tryBlock;
|
|
1455
|
+
if (res)
|
|
1456
|
+
return res;
|
|
1457
|
+
}
|
|
1458
|
+
if (data.catchClause) {
|
|
1459
|
+
const res = yield data.catchClause;
|
|
1460
|
+
if (res)
|
|
1461
|
+
return res;
|
|
1462
|
+
}
|
|
1463
|
+
if (data.finallyBlock) {
|
|
1464
|
+
const res = yield data.finallyBlock;
|
|
1465
|
+
if (res)
|
|
1466
|
+
return res;
|
|
1467
|
+
}
|
|
1468
|
+
},
|
|
1469
|
+
[SyntaxKind.CatchClause]: function* (data) {
|
|
1470
|
+
if (data.variableDeclaration) {
|
|
1471
|
+
const res = yield data.variableDeclaration;
|
|
1472
|
+
if (res)
|
|
1473
|
+
return res;
|
|
1474
|
+
}
|
|
1475
|
+
if (data.block) {
|
|
1476
|
+
const res = yield data.block;
|
|
1477
|
+
if (res)
|
|
1478
|
+
return res;
|
|
1479
|
+
}
|
|
1480
|
+
},
|
|
1481
|
+
[SyntaxKind.LabeledStatement]: function* (data) {
|
|
1482
|
+
if (data.label) {
|
|
1483
|
+
const res = yield data.label;
|
|
1484
|
+
if (res)
|
|
1485
|
+
return res;
|
|
1486
|
+
}
|
|
1487
|
+
if (data.statement) {
|
|
1488
|
+
const res = yield data.statement;
|
|
1489
|
+
if (res)
|
|
1490
|
+
return res;
|
|
1491
|
+
}
|
|
1492
|
+
},
|
|
1493
|
+
[SyntaxKind.ExpressionStatement]: function* (data) {
|
|
1494
|
+
if (data.expression) {
|
|
1495
|
+
const res = yield data.expression;
|
|
1496
|
+
if (res)
|
|
1497
|
+
return res;
|
|
1498
|
+
}
|
|
1499
|
+
},
|
|
1500
|
+
[SyntaxKind.Block]: function* (data) {
|
|
1501
|
+
for (const n of data.statements) {
|
|
1502
|
+
const res = yield n;
|
|
1503
|
+
if (res)
|
|
1504
|
+
return res;
|
|
1505
|
+
}
|
|
1506
|
+
},
|
|
1507
|
+
[SyntaxKind.VariableStatement]: function* (data) {
|
|
1508
|
+
if (data.modifiers) {
|
|
1509
|
+
for (const n of data.modifiers) {
|
|
1510
|
+
const res = yield n;
|
|
1511
|
+
if (res)
|
|
1512
|
+
return res;
|
|
1513
|
+
}
|
|
1514
|
+
}
|
|
1515
|
+
if (data.declarationList) {
|
|
1516
|
+
const res = yield data.declarationList;
|
|
1517
|
+
if (res)
|
|
1518
|
+
return res;
|
|
1519
|
+
}
|
|
1520
|
+
},
|
|
1521
|
+
[SyntaxKind.VariableDeclaration]: function* (data) {
|
|
1522
|
+
if (data.name) {
|
|
1523
|
+
const res = yield data.name;
|
|
1524
|
+
if (res)
|
|
1525
|
+
return res;
|
|
1526
|
+
}
|
|
1527
|
+
if (data.exclamationToken) {
|
|
1528
|
+
const res = yield data.exclamationToken;
|
|
1529
|
+
if (res)
|
|
1530
|
+
return res;
|
|
1531
|
+
}
|
|
1532
|
+
if (data.type) {
|
|
1533
|
+
const res = yield data.type;
|
|
1534
|
+
if (res)
|
|
1535
|
+
return res;
|
|
1536
|
+
}
|
|
1537
|
+
if (data.initializer) {
|
|
1538
|
+
const res = yield data.initializer;
|
|
1539
|
+
if (res)
|
|
1540
|
+
return res;
|
|
1541
|
+
}
|
|
1542
|
+
},
|
|
1543
|
+
[SyntaxKind.VariableDeclarationList]: function* (data) {
|
|
1544
|
+
for (const n of data.declarations) {
|
|
1545
|
+
const res = yield n;
|
|
1546
|
+
if (res)
|
|
1547
|
+
return res;
|
|
1548
|
+
}
|
|
1549
|
+
},
|
|
1550
|
+
[SyntaxKind.Parameter]: function* (data) {
|
|
1551
|
+
if (data.modifiers) {
|
|
1552
|
+
for (const n of data.modifiers) {
|
|
1553
|
+
const res = yield n;
|
|
1554
|
+
if (res)
|
|
1555
|
+
return res;
|
|
1556
|
+
}
|
|
1557
|
+
}
|
|
1558
|
+
if (data.dotDotDotToken) {
|
|
1559
|
+
const res = yield data.dotDotDotToken;
|
|
1560
|
+
if (res)
|
|
1561
|
+
return res;
|
|
1562
|
+
}
|
|
1563
|
+
if (data.name) {
|
|
1564
|
+
const res = yield data.name;
|
|
1565
|
+
if (res)
|
|
1566
|
+
return res;
|
|
1567
|
+
}
|
|
1568
|
+
if (data.questionToken) {
|
|
1569
|
+
const res = yield data.questionToken;
|
|
1570
|
+
if (res)
|
|
1571
|
+
return res;
|
|
1572
|
+
}
|
|
1573
|
+
if (data.type) {
|
|
1574
|
+
const res = yield data.type;
|
|
1575
|
+
if (res)
|
|
1576
|
+
return res;
|
|
1577
|
+
}
|
|
1578
|
+
if (data.initializer) {
|
|
1579
|
+
const res = yield data.initializer;
|
|
1580
|
+
if (res)
|
|
1581
|
+
return res;
|
|
1582
|
+
}
|
|
1583
|
+
},
|
|
1584
|
+
[SyntaxKind.BindingElement]: function* (data) {
|
|
1585
|
+
if (data.dotDotDotToken) {
|
|
1586
|
+
const res = yield data.dotDotDotToken;
|
|
1587
|
+
if (res)
|
|
1588
|
+
return res;
|
|
1589
|
+
}
|
|
1590
|
+
if (data.propertyName) {
|
|
1591
|
+
const res = yield data.propertyName;
|
|
1592
|
+
if (res)
|
|
1593
|
+
return res;
|
|
1594
|
+
}
|
|
1595
|
+
if (data.name) {
|
|
1596
|
+
const res = yield data.name;
|
|
1597
|
+
if (res)
|
|
1598
|
+
return res;
|
|
1599
|
+
}
|
|
1600
|
+
if (data.initializer) {
|
|
1601
|
+
const res = yield data.initializer;
|
|
1602
|
+
if (res)
|
|
1603
|
+
return res;
|
|
1604
|
+
}
|
|
1605
|
+
},
|
|
1606
|
+
[SyntaxKind.MissingDeclaration]: function* (data) {
|
|
1607
|
+
if (data.modifiers) {
|
|
1608
|
+
for (const n of data.modifiers) {
|
|
1609
|
+
const res = yield n;
|
|
1610
|
+
if (res)
|
|
1611
|
+
return res;
|
|
1612
|
+
}
|
|
1613
|
+
}
|
|
1614
|
+
},
|
|
1615
|
+
[SyntaxKind.FunctionDeclaration]: function* (data) {
|
|
1616
|
+
if (data.modifiers) {
|
|
1617
|
+
for (const n of data.modifiers) {
|
|
1618
|
+
const res = yield n;
|
|
1619
|
+
if (res)
|
|
1620
|
+
return res;
|
|
1621
|
+
}
|
|
1622
|
+
}
|
|
1623
|
+
if (data.asteriskToken) {
|
|
1624
|
+
const res = yield data.asteriskToken;
|
|
1625
|
+
if (res)
|
|
1626
|
+
return res;
|
|
1627
|
+
}
|
|
1628
|
+
if (data.name) {
|
|
1629
|
+
const res = yield data.name;
|
|
1630
|
+
if (res)
|
|
1631
|
+
return res;
|
|
1632
|
+
}
|
|
1633
|
+
if (data.typeParameters) {
|
|
1634
|
+
for (const n of data.typeParameters) {
|
|
1635
|
+
const res = yield n;
|
|
1636
|
+
if (res)
|
|
1637
|
+
return res;
|
|
1638
|
+
}
|
|
1639
|
+
}
|
|
1640
|
+
for (const n of data.parameters) {
|
|
1641
|
+
const res = yield n;
|
|
1642
|
+
if (res)
|
|
1643
|
+
return res;
|
|
1644
|
+
}
|
|
1645
|
+
if (data.type) {
|
|
1646
|
+
const res = yield data.type;
|
|
1647
|
+
if (res)
|
|
1648
|
+
return res;
|
|
1649
|
+
}
|
|
1650
|
+
if (data.body) {
|
|
1651
|
+
const res = yield data.body;
|
|
1652
|
+
if (res)
|
|
1653
|
+
return res;
|
|
1654
|
+
}
|
|
1655
|
+
},
|
|
1656
|
+
[SyntaxKind.ClassDeclaration]: function* (data) {
|
|
1657
|
+
if (data.modifiers) {
|
|
1658
|
+
for (const n of data.modifiers) {
|
|
1659
|
+
const res = yield n;
|
|
1660
|
+
if (res)
|
|
1661
|
+
return res;
|
|
1662
|
+
}
|
|
1663
|
+
}
|
|
1664
|
+
if (data.name) {
|
|
1665
|
+
const res = yield data.name;
|
|
1666
|
+
if (res)
|
|
1667
|
+
return res;
|
|
1668
|
+
}
|
|
1669
|
+
if (data.typeParameters) {
|
|
1670
|
+
for (const n of data.typeParameters) {
|
|
1671
|
+
const res = yield n;
|
|
1672
|
+
if (res)
|
|
1673
|
+
return res;
|
|
1674
|
+
}
|
|
1675
|
+
}
|
|
1676
|
+
if (data.heritageClauses) {
|
|
1677
|
+
for (const n of data.heritageClauses) {
|
|
1678
|
+
const res = yield n;
|
|
1679
|
+
if (res)
|
|
1680
|
+
return res;
|
|
1681
|
+
}
|
|
1682
|
+
}
|
|
1683
|
+
for (const n of data.members) {
|
|
1684
|
+
const res = yield n;
|
|
1685
|
+
if (res)
|
|
1686
|
+
return res;
|
|
1687
|
+
}
|
|
1688
|
+
},
|
|
1689
|
+
[SyntaxKind.ClassExpression]: function* (data) {
|
|
1690
|
+
if (data.modifiers) {
|
|
1691
|
+
for (const n of data.modifiers) {
|
|
1692
|
+
const res = yield n;
|
|
1693
|
+
if (res)
|
|
1694
|
+
return res;
|
|
1695
|
+
}
|
|
1696
|
+
}
|
|
1697
|
+
if (data.name) {
|
|
1698
|
+
const res = yield data.name;
|
|
1699
|
+
if (res)
|
|
1700
|
+
return res;
|
|
1701
|
+
}
|
|
1702
|
+
if (data.typeParameters) {
|
|
1703
|
+
for (const n of data.typeParameters) {
|
|
1704
|
+
const res = yield n;
|
|
1705
|
+
if (res)
|
|
1706
|
+
return res;
|
|
1707
|
+
}
|
|
1708
|
+
}
|
|
1709
|
+
if (data.heritageClauses) {
|
|
1710
|
+
for (const n of data.heritageClauses) {
|
|
1711
|
+
const res = yield n;
|
|
1712
|
+
if (res)
|
|
1713
|
+
return res;
|
|
1714
|
+
}
|
|
1715
|
+
}
|
|
1716
|
+
for (const n of data.members) {
|
|
1717
|
+
const res = yield n;
|
|
1718
|
+
if (res)
|
|
1719
|
+
return res;
|
|
1720
|
+
}
|
|
1721
|
+
},
|
|
1722
|
+
[SyntaxKind.HeritageClause]: function* (data) {
|
|
1723
|
+
for (const n of data.types) {
|
|
1724
|
+
const res = yield n;
|
|
1725
|
+
if (res)
|
|
1726
|
+
return res;
|
|
1727
|
+
}
|
|
1728
|
+
},
|
|
1729
|
+
[SyntaxKind.InterfaceDeclaration]: function* (data) {
|
|
1730
|
+
if (data.modifiers) {
|
|
1731
|
+
for (const n of data.modifiers) {
|
|
1732
|
+
const res = yield n;
|
|
1733
|
+
if (res)
|
|
1734
|
+
return res;
|
|
1735
|
+
}
|
|
1736
|
+
}
|
|
1737
|
+
if (data.name) {
|
|
1738
|
+
const res = yield data.name;
|
|
1739
|
+
if (res)
|
|
1740
|
+
return res;
|
|
1741
|
+
}
|
|
1742
|
+
if (data.typeParameters) {
|
|
1743
|
+
for (const n of data.typeParameters) {
|
|
1744
|
+
const res = yield n;
|
|
1745
|
+
if (res)
|
|
1746
|
+
return res;
|
|
1747
|
+
}
|
|
1748
|
+
}
|
|
1749
|
+
if (data.heritageClauses) {
|
|
1750
|
+
for (const n of data.heritageClauses) {
|
|
1751
|
+
const res = yield n;
|
|
1752
|
+
if (res)
|
|
1753
|
+
return res;
|
|
1754
|
+
}
|
|
1755
|
+
}
|
|
1756
|
+
for (const n of data.members) {
|
|
1757
|
+
const res = yield n;
|
|
1758
|
+
if (res)
|
|
1759
|
+
return res;
|
|
1760
|
+
}
|
|
1761
|
+
},
|
|
1762
|
+
[SyntaxKind.TypeAliasDeclaration]: function* (data) {
|
|
1763
|
+
if (data.modifiers) {
|
|
1764
|
+
for (const n of data.modifiers) {
|
|
1765
|
+
const res = yield n;
|
|
1766
|
+
if (res)
|
|
1767
|
+
return res;
|
|
1768
|
+
}
|
|
1769
|
+
}
|
|
1770
|
+
if (data.name) {
|
|
1771
|
+
const res = yield data.name;
|
|
1772
|
+
if (res)
|
|
1773
|
+
return res;
|
|
1774
|
+
}
|
|
1775
|
+
if (data.typeParameters) {
|
|
1776
|
+
for (const n of data.typeParameters) {
|
|
1777
|
+
const res = yield n;
|
|
1778
|
+
if (res)
|
|
1779
|
+
return res;
|
|
1780
|
+
}
|
|
1781
|
+
}
|
|
1782
|
+
if (data.type) {
|
|
1783
|
+
const res = yield data.type;
|
|
1784
|
+
if (res)
|
|
1785
|
+
return res;
|
|
1786
|
+
}
|
|
1787
|
+
},
|
|
1788
|
+
[SyntaxKind.JSTypeAliasDeclaration]: function* (data) {
|
|
1789
|
+
if (data.modifiers) {
|
|
1790
|
+
for (const n of data.modifiers) {
|
|
1791
|
+
const res = yield n;
|
|
1792
|
+
if (res)
|
|
1793
|
+
return res;
|
|
1794
|
+
}
|
|
1795
|
+
}
|
|
1796
|
+
if (data.name) {
|
|
1797
|
+
const res = yield data.name;
|
|
1798
|
+
if (res)
|
|
1799
|
+
return res;
|
|
1800
|
+
}
|
|
1801
|
+
if (data.typeParameters) {
|
|
1802
|
+
for (const n of data.typeParameters) {
|
|
1803
|
+
const res = yield n;
|
|
1804
|
+
if (res)
|
|
1805
|
+
return res;
|
|
1806
|
+
}
|
|
1807
|
+
}
|
|
1808
|
+
if (data.type) {
|
|
1809
|
+
const res = yield data.type;
|
|
1810
|
+
if (res)
|
|
1811
|
+
return res;
|
|
1812
|
+
}
|
|
1813
|
+
},
|
|
1814
|
+
[SyntaxKind.EnumMember]: function* (data) {
|
|
1815
|
+
if (data.name) {
|
|
1816
|
+
const res = yield data.name;
|
|
1817
|
+
if (res)
|
|
1818
|
+
return res;
|
|
1819
|
+
}
|
|
1820
|
+
if (data.initializer) {
|
|
1821
|
+
const res = yield data.initializer;
|
|
1822
|
+
if (res)
|
|
1823
|
+
return res;
|
|
1824
|
+
}
|
|
1825
|
+
},
|
|
1826
|
+
[SyntaxKind.EnumDeclaration]: function* (data) {
|
|
1827
|
+
if (data.modifiers) {
|
|
1828
|
+
for (const n of data.modifiers) {
|
|
1829
|
+
const res = yield n;
|
|
1830
|
+
if (res)
|
|
1831
|
+
return res;
|
|
1832
|
+
}
|
|
1833
|
+
}
|
|
1834
|
+
if (data.name) {
|
|
1835
|
+
const res = yield data.name;
|
|
1836
|
+
if (res)
|
|
1837
|
+
return res;
|
|
1838
|
+
}
|
|
1839
|
+
for (const n of data.members) {
|
|
1840
|
+
const res = yield n;
|
|
1841
|
+
if (res)
|
|
1842
|
+
return res;
|
|
1843
|
+
}
|
|
1844
|
+
},
|
|
1845
|
+
[SyntaxKind.ModuleBlock]: function* (data) {
|
|
1846
|
+
for (const n of data.statements) {
|
|
1847
|
+
const res = yield n;
|
|
1848
|
+
if (res)
|
|
1849
|
+
return res;
|
|
1850
|
+
}
|
|
1851
|
+
},
|
|
1852
|
+
[SyntaxKind.ImportDeclaration]: function* (data) {
|
|
1853
|
+
if (data.modifiers) {
|
|
1854
|
+
for (const n of data.modifiers) {
|
|
1855
|
+
const res = yield n;
|
|
1856
|
+
if (res)
|
|
1857
|
+
return res;
|
|
1858
|
+
}
|
|
1859
|
+
}
|
|
1860
|
+
if (data.importClause) {
|
|
1861
|
+
const res = yield data.importClause;
|
|
1862
|
+
if (res)
|
|
1863
|
+
return res;
|
|
1864
|
+
}
|
|
1865
|
+
if (data.moduleSpecifier) {
|
|
1866
|
+
const res = yield data.moduleSpecifier;
|
|
1867
|
+
if (res)
|
|
1868
|
+
return res;
|
|
1869
|
+
}
|
|
1870
|
+
if (data.attributes) {
|
|
1871
|
+
const res = yield data.attributes;
|
|
1872
|
+
if (res)
|
|
1873
|
+
return res;
|
|
1874
|
+
}
|
|
1875
|
+
},
|
|
1876
|
+
[SyntaxKind.JSImportDeclaration]: function* (data) {
|
|
1877
|
+
if (data.modifiers) {
|
|
1878
|
+
for (const n of data.modifiers) {
|
|
1879
|
+
const res = yield n;
|
|
1880
|
+
if (res)
|
|
1881
|
+
return res;
|
|
1882
|
+
}
|
|
1883
|
+
}
|
|
1884
|
+
if (data.importClause) {
|
|
1885
|
+
const res = yield data.importClause;
|
|
1886
|
+
if (res)
|
|
1887
|
+
return res;
|
|
1888
|
+
}
|
|
1889
|
+
if (data.moduleSpecifier) {
|
|
1890
|
+
const res = yield data.moduleSpecifier;
|
|
1891
|
+
if (res)
|
|
1892
|
+
return res;
|
|
1893
|
+
}
|
|
1894
|
+
if (data.attributes) {
|
|
1895
|
+
const res = yield data.attributes;
|
|
1896
|
+
if (res)
|
|
1897
|
+
return res;
|
|
1898
|
+
}
|
|
1899
|
+
},
|
|
1900
|
+
[SyntaxKind.ExternalModuleReference]: function* (data) {
|
|
1901
|
+
if (data.expression) {
|
|
1902
|
+
const res = yield data.expression;
|
|
1903
|
+
if (res)
|
|
1904
|
+
return res;
|
|
1905
|
+
}
|
|
1906
|
+
},
|
|
1907
|
+
[SyntaxKind.NamespaceImport]: function* (data) {
|
|
1908
|
+
if (data.name) {
|
|
1909
|
+
const res = yield data.name;
|
|
1910
|
+
if (res)
|
|
1911
|
+
return res;
|
|
1912
|
+
}
|
|
1913
|
+
},
|
|
1914
|
+
[SyntaxKind.NamedImports]: function* (data) {
|
|
1915
|
+
for (const n of data.elements) {
|
|
1916
|
+
const res = yield n;
|
|
1917
|
+
if (res)
|
|
1918
|
+
return res;
|
|
1919
|
+
}
|
|
1920
|
+
},
|
|
1921
|
+
[SyntaxKind.ExportAssignment]: function* (data) {
|
|
1922
|
+
if (data.modifiers) {
|
|
1923
|
+
for (const n of data.modifiers) {
|
|
1924
|
+
const res = yield n;
|
|
1925
|
+
if (res)
|
|
1926
|
+
return res;
|
|
1927
|
+
}
|
|
1928
|
+
}
|
|
1929
|
+
if (data.type) {
|
|
1930
|
+
const res = yield data.type;
|
|
1931
|
+
if (res)
|
|
1932
|
+
return res;
|
|
1933
|
+
}
|
|
1934
|
+
if (data.expression) {
|
|
1935
|
+
const res = yield data.expression;
|
|
1936
|
+
if (res)
|
|
1937
|
+
return res;
|
|
1938
|
+
}
|
|
1939
|
+
},
|
|
1940
|
+
[SyntaxKind.NamespaceExportDeclaration]: function* (data) {
|
|
1941
|
+
if (data.modifiers) {
|
|
1942
|
+
for (const n of data.modifiers) {
|
|
1943
|
+
const res = yield n;
|
|
1944
|
+
if (res)
|
|
1945
|
+
return res;
|
|
1946
|
+
}
|
|
1947
|
+
}
|
|
1948
|
+
if (data.name) {
|
|
1949
|
+
const res = yield data.name;
|
|
1950
|
+
if (res)
|
|
1951
|
+
return res;
|
|
1952
|
+
}
|
|
1953
|
+
},
|
|
1954
|
+
[SyntaxKind.NamespaceExport]: function* (data) {
|
|
1955
|
+
if (data.name) {
|
|
1956
|
+
const res = yield data.name;
|
|
1957
|
+
if (res)
|
|
1958
|
+
return res;
|
|
1959
|
+
}
|
|
1960
|
+
},
|
|
1961
|
+
[SyntaxKind.NamedExports]: function* (data) {
|
|
1962
|
+
for (const n of data.elements) {
|
|
1963
|
+
const res = yield n;
|
|
1964
|
+
if (res)
|
|
1965
|
+
return res;
|
|
1966
|
+
}
|
|
1967
|
+
},
|
|
1968
|
+
[SyntaxKind.ExportSpecifier]: function* (data) {
|
|
1969
|
+
if (data.propertyName) {
|
|
1970
|
+
const res = yield data.propertyName;
|
|
1971
|
+
if (res)
|
|
1972
|
+
return res;
|
|
1973
|
+
}
|
|
1974
|
+
if (data.name) {
|
|
1975
|
+
const res = yield data.name;
|
|
1976
|
+
if (res)
|
|
1977
|
+
return res;
|
|
1978
|
+
}
|
|
1979
|
+
},
|
|
1980
|
+
[SyntaxKind.CallSignature]: function* (data) {
|
|
1981
|
+
if (data.typeParameters) {
|
|
1982
|
+
for (const n of data.typeParameters) {
|
|
1983
|
+
const res = yield n;
|
|
1984
|
+
if (res)
|
|
1985
|
+
return res;
|
|
1986
|
+
}
|
|
1987
|
+
}
|
|
1988
|
+
for (const n of data.parameters) {
|
|
1989
|
+
const res = yield n;
|
|
1990
|
+
if (res)
|
|
1991
|
+
return res;
|
|
1992
|
+
}
|
|
1993
|
+
if (data.type) {
|
|
1994
|
+
const res = yield data.type;
|
|
1995
|
+
if (res)
|
|
1996
|
+
return res;
|
|
1997
|
+
}
|
|
1998
|
+
},
|
|
1999
|
+
[SyntaxKind.ConstructSignature]: function* (data) {
|
|
2000
|
+
if (data.typeParameters) {
|
|
2001
|
+
for (const n of data.typeParameters) {
|
|
2002
|
+
const res = yield n;
|
|
2003
|
+
if (res)
|
|
2004
|
+
return res;
|
|
2005
|
+
}
|
|
2006
|
+
}
|
|
2007
|
+
for (const n of data.parameters) {
|
|
2008
|
+
const res = yield n;
|
|
2009
|
+
if (res)
|
|
2010
|
+
return res;
|
|
2011
|
+
}
|
|
2012
|
+
if (data.type) {
|
|
2013
|
+
const res = yield data.type;
|
|
2014
|
+
if (res)
|
|
2015
|
+
return res;
|
|
2016
|
+
}
|
|
2017
|
+
},
|
|
2018
|
+
[SyntaxKind.Constructor]: function* (data) {
|
|
2019
|
+
if (data.modifiers) {
|
|
2020
|
+
for (const n of data.modifiers) {
|
|
2021
|
+
const res = yield n;
|
|
2022
|
+
if (res)
|
|
2023
|
+
return res;
|
|
2024
|
+
}
|
|
2025
|
+
}
|
|
2026
|
+
if (data.typeParameters) {
|
|
2027
|
+
for (const n of data.typeParameters) {
|
|
2028
|
+
const res = yield n;
|
|
2029
|
+
if (res)
|
|
2030
|
+
return res;
|
|
2031
|
+
}
|
|
2032
|
+
}
|
|
2033
|
+
for (const n of data.parameters) {
|
|
2034
|
+
const res = yield n;
|
|
2035
|
+
if (res)
|
|
2036
|
+
return res;
|
|
2037
|
+
}
|
|
2038
|
+
if (data.type) {
|
|
2039
|
+
const res = yield data.type;
|
|
2040
|
+
if (res)
|
|
2041
|
+
return res;
|
|
2042
|
+
}
|
|
2043
|
+
if (data.body) {
|
|
2044
|
+
const res = yield data.body;
|
|
2045
|
+
if (res)
|
|
2046
|
+
return res;
|
|
2047
|
+
}
|
|
2048
|
+
},
|
|
2049
|
+
[SyntaxKind.GetAccessor]: function* (data) {
|
|
2050
|
+
if (data.modifiers) {
|
|
2051
|
+
for (const n of data.modifiers) {
|
|
2052
|
+
const res = yield n;
|
|
2053
|
+
if (res)
|
|
2054
|
+
return res;
|
|
2055
|
+
}
|
|
2056
|
+
}
|
|
2057
|
+
if (data.name) {
|
|
2058
|
+
const res = yield data.name;
|
|
2059
|
+
if (res)
|
|
2060
|
+
return res;
|
|
2061
|
+
}
|
|
2062
|
+
if (data.typeParameters) {
|
|
2063
|
+
for (const n of data.typeParameters) {
|
|
2064
|
+
const res = yield n;
|
|
2065
|
+
if (res)
|
|
2066
|
+
return res;
|
|
2067
|
+
}
|
|
2068
|
+
}
|
|
2069
|
+
for (const n of data.parameters) {
|
|
2070
|
+
const res = yield n;
|
|
2071
|
+
if (res)
|
|
2072
|
+
return res;
|
|
2073
|
+
}
|
|
2074
|
+
if (data.type) {
|
|
2075
|
+
const res = yield data.type;
|
|
2076
|
+
if (res)
|
|
2077
|
+
return res;
|
|
2078
|
+
}
|
|
2079
|
+
if (data.body) {
|
|
2080
|
+
const res = yield data.body;
|
|
2081
|
+
if (res)
|
|
2082
|
+
return res;
|
|
2083
|
+
}
|
|
2084
|
+
},
|
|
2085
|
+
[SyntaxKind.SetAccessor]: function* (data) {
|
|
2086
|
+
if (data.modifiers) {
|
|
2087
|
+
for (const n of data.modifiers) {
|
|
2088
|
+
const res = yield n;
|
|
2089
|
+
if (res)
|
|
2090
|
+
return res;
|
|
2091
|
+
}
|
|
2092
|
+
}
|
|
2093
|
+
if (data.name) {
|
|
2094
|
+
const res = yield data.name;
|
|
2095
|
+
if (res)
|
|
2096
|
+
return res;
|
|
2097
|
+
}
|
|
2098
|
+
if (data.typeParameters) {
|
|
2099
|
+
for (const n of data.typeParameters) {
|
|
2100
|
+
const res = yield n;
|
|
2101
|
+
if (res)
|
|
2102
|
+
return res;
|
|
2103
|
+
}
|
|
2104
|
+
}
|
|
2105
|
+
for (const n of data.parameters) {
|
|
2106
|
+
const res = yield n;
|
|
2107
|
+
if (res)
|
|
2108
|
+
return res;
|
|
2109
|
+
}
|
|
2110
|
+
if (data.type) {
|
|
2111
|
+
const res = yield data.type;
|
|
2112
|
+
if (res)
|
|
2113
|
+
return res;
|
|
2114
|
+
}
|
|
2115
|
+
if (data.body) {
|
|
2116
|
+
const res = yield data.body;
|
|
2117
|
+
if (res)
|
|
2118
|
+
return res;
|
|
2119
|
+
}
|
|
2120
|
+
},
|
|
2121
|
+
[SyntaxKind.IndexSignature]: function* (data) {
|
|
2122
|
+
if (data.modifiers) {
|
|
2123
|
+
for (const n of data.modifiers) {
|
|
2124
|
+
const res = yield n;
|
|
2125
|
+
if (res)
|
|
2126
|
+
return res;
|
|
2127
|
+
}
|
|
2128
|
+
}
|
|
2129
|
+
for (const n of data.parameters) {
|
|
2130
|
+
const res = yield n;
|
|
2131
|
+
if (res)
|
|
2132
|
+
return res;
|
|
2133
|
+
}
|
|
2134
|
+
if (data.type) {
|
|
2135
|
+
const res = yield data.type;
|
|
2136
|
+
if (res)
|
|
2137
|
+
return res;
|
|
2138
|
+
}
|
|
2139
|
+
},
|
|
2140
|
+
[SyntaxKind.MethodSignature]: function* (data) {
|
|
2141
|
+
if (data.modifiers) {
|
|
2142
|
+
for (const n of data.modifiers) {
|
|
2143
|
+
const res = yield n;
|
|
2144
|
+
if (res)
|
|
2145
|
+
return res;
|
|
2146
|
+
}
|
|
2147
|
+
}
|
|
2148
|
+
if (data.name) {
|
|
2149
|
+
const res = yield data.name;
|
|
2150
|
+
if (res)
|
|
2151
|
+
return res;
|
|
2152
|
+
}
|
|
2153
|
+
if (data.postfixToken) {
|
|
2154
|
+
const res = yield data.postfixToken;
|
|
2155
|
+
if (res)
|
|
2156
|
+
return res;
|
|
2157
|
+
}
|
|
2158
|
+
if (data.typeParameters) {
|
|
2159
|
+
for (const n of data.typeParameters) {
|
|
2160
|
+
const res = yield n;
|
|
2161
|
+
if (res)
|
|
2162
|
+
return res;
|
|
2163
|
+
}
|
|
2164
|
+
}
|
|
2165
|
+
for (const n of data.parameters) {
|
|
2166
|
+
const res = yield n;
|
|
2167
|
+
if (res)
|
|
2168
|
+
return res;
|
|
2169
|
+
}
|
|
2170
|
+
if (data.type) {
|
|
2171
|
+
const res = yield data.type;
|
|
2172
|
+
if (res)
|
|
2173
|
+
return res;
|
|
2174
|
+
}
|
|
2175
|
+
},
|
|
2176
|
+
[SyntaxKind.MethodDeclaration]: function* (data) {
|
|
2177
|
+
if (data.modifiers) {
|
|
2178
|
+
for (const n of data.modifiers) {
|
|
2179
|
+
const res = yield n;
|
|
2180
|
+
if (res)
|
|
2181
|
+
return res;
|
|
2182
|
+
}
|
|
2183
|
+
}
|
|
2184
|
+
if (data.asteriskToken) {
|
|
2185
|
+
const res = yield data.asteriskToken;
|
|
2186
|
+
if (res)
|
|
2187
|
+
return res;
|
|
2188
|
+
}
|
|
2189
|
+
if (data.name) {
|
|
2190
|
+
const res = yield data.name;
|
|
2191
|
+
if (res)
|
|
2192
|
+
return res;
|
|
2193
|
+
}
|
|
2194
|
+
if (data.postfixToken) {
|
|
2195
|
+
const res = yield data.postfixToken;
|
|
2196
|
+
if (res)
|
|
2197
|
+
return res;
|
|
2198
|
+
}
|
|
2199
|
+
if (data.typeParameters) {
|
|
2200
|
+
for (const n of data.typeParameters) {
|
|
2201
|
+
const res = yield n;
|
|
2202
|
+
if (res)
|
|
2203
|
+
return res;
|
|
2204
|
+
}
|
|
2205
|
+
}
|
|
2206
|
+
for (const n of data.parameters) {
|
|
2207
|
+
const res = yield n;
|
|
2208
|
+
if (res)
|
|
2209
|
+
return res;
|
|
2210
|
+
}
|
|
2211
|
+
if (data.type) {
|
|
2212
|
+
const res = yield data.type;
|
|
2213
|
+
if (res)
|
|
2214
|
+
return res;
|
|
2215
|
+
}
|
|
2216
|
+
if (data.body) {
|
|
2217
|
+
const res = yield data.body;
|
|
2218
|
+
if (res)
|
|
2219
|
+
return res;
|
|
2220
|
+
}
|
|
2221
|
+
},
|
|
2222
|
+
[SyntaxKind.PropertySignature]: function* (data) {
|
|
2223
|
+
if (data.modifiers) {
|
|
2224
|
+
for (const n of data.modifiers) {
|
|
2225
|
+
const res = yield n;
|
|
2226
|
+
if (res)
|
|
2227
|
+
return res;
|
|
2228
|
+
}
|
|
2229
|
+
}
|
|
2230
|
+
if (data.name) {
|
|
2231
|
+
const res = yield data.name;
|
|
2232
|
+
if (res)
|
|
2233
|
+
return res;
|
|
2234
|
+
}
|
|
2235
|
+
if (data.postfixToken) {
|
|
2236
|
+
const res = yield data.postfixToken;
|
|
2237
|
+
if (res)
|
|
2238
|
+
return res;
|
|
2239
|
+
}
|
|
2240
|
+
if (data.type) {
|
|
2241
|
+
const res = yield data.type;
|
|
2242
|
+
if (res)
|
|
2243
|
+
return res;
|
|
2244
|
+
}
|
|
2245
|
+
if (data.initializer) {
|
|
2246
|
+
const res = yield data.initializer;
|
|
2247
|
+
if (res)
|
|
2248
|
+
return res;
|
|
2249
|
+
}
|
|
2250
|
+
},
|
|
2251
|
+
[SyntaxKind.PropertyDeclaration]: function* (data) {
|
|
2252
|
+
if (data.modifiers) {
|
|
2253
|
+
for (const n of data.modifiers) {
|
|
2254
|
+
const res = yield n;
|
|
2255
|
+
if (res)
|
|
2256
|
+
return res;
|
|
2257
|
+
}
|
|
2258
|
+
}
|
|
2259
|
+
if (data.name) {
|
|
2260
|
+
const res = yield data.name;
|
|
2261
|
+
if (res)
|
|
2262
|
+
return res;
|
|
2263
|
+
}
|
|
2264
|
+
if (data.postfixToken) {
|
|
2265
|
+
const res = yield data.postfixToken;
|
|
2266
|
+
if (res)
|
|
2267
|
+
return res;
|
|
2268
|
+
}
|
|
2269
|
+
if (data.type) {
|
|
2270
|
+
const res = yield data.type;
|
|
2271
|
+
if (res)
|
|
2272
|
+
return res;
|
|
2273
|
+
}
|
|
2274
|
+
if (data.initializer) {
|
|
2275
|
+
const res = yield data.initializer;
|
|
2276
|
+
if (res)
|
|
2277
|
+
return res;
|
|
2278
|
+
}
|
|
2279
|
+
},
|
|
2280
|
+
[SyntaxKind.ClassStaticBlockDeclaration]: function* (data) {
|
|
2281
|
+
if (data.modifiers) {
|
|
2282
|
+
for (const n of data.modifiers) {
|
|
2283
|
+
const res = yield n;
|
|
2284
|
+
if (res)
|
|
2285
|
+
return res;
|
|
2286
|
+
}
|
|
2287
|
+
}
|
|
2288
|
+
if (data.body) {
|
|
2289
|
+
const res = yield data.body;
|
|
2290
|
+
if (res)
|
|
2291
|
+
return res;
|
|
2292
|
+
}
|
|
2293
|
+
},
|
|
2294
|
+
[SyntaxKind.BinaryExpression]: function* (data) {
|
|
2295
|
+
if (data.modifiers) {
|
|
2296
|
+
for (const n of data.modifiers) {
|
|
2297
|
+
const res = yield n;
|
|
2298
|
+
if (res)
|
|
2299
|
+
return res;
|
|
2300
|
+
}
|
|
2301
|
+
}
|
|
2302
|
+
if (data.left) {
|
|
2303
|
+
const res = yield data.left;
|
|
2304
|
+
if (res)
|
|
2305
|
+
return res;
|
|
2306
|
+
}
|
|
2307
|
+
if (data.type) {
|
|
2308
|
+
const res = yield data.type;
|
|
2309
|
+
if (res)
|
|
2310
|
+
return res;
|
|
2311
|
+
}
|
|
2312
|
+
if (data.operatorToken) {
|
|
2313
|
+
const res = yield data.operatorToken;
|
|
2314
|
+
if (res)
|
|
2315
|
+
return res;
|
|
2316
|
+
}
|
|
2317
|
+
if (data.right) {
|
|
2318
|
+
const res = yield data.right;
|
|
2319
|
+
if (res)
|
|
2320
|
+
return res;
|
|
2321
|
+
}
|
|
2322
|
+
},
|
|
2323
|
+
[SyntaxKind.PrefixUnaryExpression]: function* (data) {
|
|
2324
|
+
if (data.operand) {
|
|
2325
|
+
const res = yield data.operand;
|
|
2326
|
+
if (res)
|
|
2327
|
+
return res;
|
|
2328
|
+
}
|
|
2329
|
+
},
|
|
2330
|
+
[SyntaxKind.PostfixUnaryExpression]: function* (data) {
|
|
2331
|
+
if (data.operand) {
|
|
2332
|
+
const res = yield data.operand;
|
|
2333
|
+
if (res)
|
|
2334
|
+
return res;
|
|
2335
|
+
}
|
|
2336
|
+
},
|
|
2337
|
+
[SyntaxKind.YieldExpression]: function* (data) {
|
|
2338
|
+
if (data.asteriskToken) {
|
|
2339
|
+
const res = yield data.asteriskToken;
|
|
2340
|
+
if (res)
|
|
2341
|
+
return res;
|
|
2342
|
+
}
|
|
2343
|
+
if (data.expression) {
|
|
2344
|
+
const res = yield data.expression;
|
|
2345
|
+
if (res)
|
|
2346
|
+
return res;
|
|
2347
|
+
}
|
|
2348
|
+
},
|
|
2349
|
+
[SyntaxKind.ArrowFunction]: function* (data) {
|
|
2350
|
+
if (data.modifiers) {
|
|
2351
|
+
for (const n of data.modifiers) {
|
|
2352
|
+
const res = yield n;
|
|
2353
|
+
if (res)
|
|
2354
|
+
return res;
|
|
2355
|
+
}
|
|
2356
|
+
}
|
|
2357
|
+
if (data.typeParameters) {
|
|
2358
|
+
for (const n of data.typeParameters) {
|
|
2359
|
+
const res = yield n;
|
|
2360
|
+
if (res)
|
|
2361
|
+
return res;
|
|
2362
|
+
}
|
|
2363
|
+
}
|
|
2364
|
+
for (const n of data.parameters) {
|
|
2365
|
+
const res = yield n;
|
|
2366
|
+
if (res)
|
|
2367
|
+
return res;
|
|
2368
|
+
}
|
|
2369
|
+
if (data.type) {
|
|
2370
|
+
const res = yield data.type;
|
|
2371
|
+
if (res)
|
|
2372
|
+
return res;
|
|
2373
|
+
}
|
|
2374
|
+
if (data.equalsGreaterThanToken) {
|
|
2375
|
+
const res = yield data.equalsGreaterThanToken;
|
|
2376
|
+
if (res)
|
|
2377
|
+
return res;
|
|
2378
|
+
}
|
|
2379
|
+
if (data.body) {
|
|
2380
|
+
const res = yield data.body;
|
|
2381
|
+
if (res)
|
|
2382
|
+
return res;
|
|
2383
|
+
}
|
|
2384
|
+
},
|
|
2385
|
+
[SyntaxKind.FunctionExpression]: function* (data) {
|
|
2386
|
+
if (data.modifiers) {
|
|
2387
|
+
for (const n of data.modifiers) {
|
|
2388
|
+
const res = yield n;
|
|
2389
|
+
if (res)
|
|
2390
|
+
return res;
|
|
2391
|
+
}
|
|
2392
|
+
}
|
|
2393
|
+
if (data.asteriskToken) {
|
|
2394
|
+
const res = yield data.asteriskToken;
|
|
2395
|
+
if (res)
|
|
2396
|
+
return res;
|
|
2397
|
+
}
|
|
2398
|
+
if (data.name) {
|
|
2399
|
+
const res = yield data.name;
|
|
2400
|
+
if (res)
|
|
2401
|
+
return res;
|
|
2402
|
+
}
|
|
2403
|
+
if (data.typeParameters) {
|
|
2404
|
+
for (const n of data.typeParameters) {
|
|
2405
|
+
const res = yield n;
|
|
2406
|
+
if (res)
|
|
2407
|
+
return res;
|
|
2408
|
+
}
|
|
2409
|
+
}
|
|
2410
|
+
for (const n of data.parameters) {
|
|
2411
|
+
const res = yield n;
|
|
2412
|
+
if (res)
|
|
2413
|
+
return res;
|
|
2414
|
+
}
|
|
2415
|
+
if (data.type) {
|
|
2416
|
+
const res = yield data.type;
|
|
2417
|
+
if (res)
|
|
2418
|
+
return res;
|
|
2419
|
+
}
|
|
2420
|
+
if (data.body) {
|
|
2421
|
+
const res = yield data.body;
|
|
2422
|
+
if (res)
|
|
2423
|
+
return res;
|
|
2424
|
+
}
|
|
2425
|
+
},
|
|
2426
|
+
[SyntaxKind.AsExpression]: function* (data) {
|
|
2427
|
+
if (data.expression) {
|
|
2428
|
+
const res = yield data.expression;
|
|
2429
|
+
if (res)
|
|
2430
|
+
return res;
|
|
2431
|
+
}
|
|
2432
|
+
if (data.type) {
|
|
2433
|
+
const res = yield data.type;
|
|
2434
|
+
if (res)
|
|
2435
|
+
return res;
|
|
2436
|
+
}
|
|
2437
|
+
},
|
|
2438
|
+
[SyntaxKind.SatisfiesExpression]: function* (data) {
|
|
2439
|
+
if (data.expression) {
|
|
2440
|
+
const res = yield data.expression;
|
|
2441
|
+
if (res)
|
|
2442
|
+
return res;
|
|
2443
|
+
}
|
|
2444
|
+
if (data.type) {
|
|
2445
|
+
const res = yield data.type;
|
|
2446
|
+
if (res)
|
|
2447
|
+
return res;
|
|
2448
|
+
}
|
|
2449
|
+
},
|
|
2450
|
+
[SyntaxKind.ConditionalExpression]: function* (data) {
|
|
2451
|
+
if (data.condition) {
|
|
2452
|
+
const res = yield data.condition;
|
|
2453
|
+
if (res)
|
|
2454
|
+
return res;
|
|
2455
|
+
}
|
|
2456
|
+
if (data.questionToken) {
|
|
2457
|
+
const res = yield data.questionToken;
|
|
2458
|
+
if (res)
|
|
2459
|
+
return res;
|
|
2460
|
+
}
|
|
2461
|
+
if (data.whenTrue) {
|
|
2462
|
+
const res = yield data.whenTrue;
|
|
2463
|
+
if (res)
|
|
2464
|
+
return res;
|
|
2465
|
+
}
|
|
2466
|
+
if (data.colonToken) {
|
|
2467
|
+
const res = yield data.colonToken;
|
|
2468
|
+
if (res)
|
|
2469
|
+
return res;
|
|
2470
|
+
}
|
|
2471
|
+
if (data.whenFalse) {
|
|
2472
|
+
const res = yield data.whenFalse;
|
|
2473
|
+
if (res)
|
|
2474
|
+
return res;
|
|
2475
|
+
}
|
|
2476
|
+
},
|
|
2477
|
+
[SyntaxKind.PropertyAccessExpression]: function* (data) {
|
|
2478
|
+
if (data.expression) {
|
|
2479
|
+
const res = yield data.expression;
|
|
2480
|
+
if (res)
|
|
2481
|
+
return res;
|
|
2482
|
+
}
|
|
2483
|
+
if (data.questionDotToken) {
|
|
2484
|
+
const res = yield data.questionDotToken;
|
|
2485
|
+
if (res)
|
|
2486
|
+
return res;
|
|
2487
|
+
}
|
|
2488
|
+
if (data.name) {
|
|
2489
|
+
const res = yield data.name;
|
|
2490
|
+
if (res)
|
|
2491
|
+
return res;
|
|
2492
|
+
}
|
|
2493
|
+
},
|
|
2494
|
+
[SyntaxKind.ElementAccessExpression]: function* (data) {
|
|
2495
|
+
if (data.expression) {
|
|
2496
|
+
const res = yield data.expression;
|
|
2497
|
+
if (res)
|
|
2498
|
+
return res;
|
|
2499
|
+
}
|
|
2500
|
+
if (data.questionDotToken) {
|
|
2501
|
+
const res = yield data.questionDotToken;
|
|
2502
|
+
if (res)
|
|
2503
|
+
return res;
|
|
2504
|
+
}
|
|
2505
|
+
if (data.argumentExpression) {
|
|
2506
|
+
const res = yield data.argumentExpression;
|
|
2507
|
+
if (res)
|
|
2508
|
+
return res;
|
|
2509
|
+
}
|
|
2510
|
+
},
|
|
2511
|
+
[SyntaxKind.CallExpression]: function* (data) {
|
|
2512
|
+
if (data.expression) {
|
|
2513
|
+
const res = yield data.expression;
|
|
2514
|
+
if (res)
|
|
2515
|
+
return res;
|
|
2516
|
+
}
|
|
2517
|
+
if (data.questionDotToken) {
|
|
2518
|
+
const res = yield data.questionDotToken;
|
|
2519
|
+
if (res)
|
|
2520
|
+
return res;
|
|
2521
|
+
}
|
|
2522
|
+
if (data.typeArguments) {
|
|
2523
|
+
for (const n of data.typeArguments) {
|
|
2524
|
+
const res = yield n;
|
|
2525
|
+
if (res)
|
|
2526
|
+
return res;
|
|
2527
|
+
}
|
|
2528
|
+
}
|
|
2529
|
+
for (const n of data.arguments) {
|
|
2530
|
+
const res = yield n;
|
|
2531
|
+
if (res)
|
|
2532
|
+
return res;
|
|
2533
|
+
}
|
|
2534
|
+
},
|
|
2535
|
+
[SyntaxKind.NewExpression]: function* (data) {
|
|
2536
|
+
if (data.expression) {
|
|
2537
|
+
const res = yield data.expression;
|
|
2538
|
+
if (res)
|
|
2539
|
+
return res;
|
|
2540
|
+
}
|
|
2541
|
+
if (data.typeArguments) {
|
|
2542
|
+
for (const n of data.typeArguments) {
|
|
2543
|
+
const res = yield n;
|
|
2544
|
+
if (res)
|
|
2545
|
+
return res;
|
|
2546
|
+
}
|
|
2547
|
+
}
|
|
2548
|
+
if (data.arguments) {
|
|
2549
|
+
for (const n of data.arguments) {
|
|
2550
|
+
const res = yield n;
|
|
2551
|
+
if (res)
|
|
2552
|
+
return res;
|
|
2553
|
+
}
|
|
2554
|
+
}
|
|
2555
|
+
},
|
|
2556
|
+
[SyntaxKind.MetaProperty]: function* (data) {
|
|
2557
|
+
if (data.name) {
|
|
2558
|
+
const res = yield data.name;
|
|
2559
|
+
if (res)
|
|
2560
|
+
return res;
|
|
2561
|
+
}
|
|
2562
|
+
},
|
|
2563
|
+
[SyntaxKind.NonNullExpression]: function* (data) {
|
|
2564
|
+
if (data.expression) {
|
|
2565
|
+
const res = yield data.expression;
|
|
2566
|
+
if (res)
|
|
2567
|
+
return res;
|
|
2568
|
+
}
|
|
2569
|
+
},
|
|
2570
|
+
[SyntaxKind.SpreadElement]: function* (data) {
|
|
2571
|
+
if (data.expression) {
|
|
2572
|
+
const res = yield data.expression;
|
|
2573
|
+
if (res)
|
|
2574
|
+
return res;
|
|
2575
|
+
}
|
|
2576
|
+
},
|
|
2577
|
+
[SyntaxKind.TemplateExpression]: function* (data) {
|
|
2578
|
+
if (data.head) {
|
|
2579
|
+
const res = yield data.head;
|
|
2580
|
+
if (res)
|
|
2581
|
+
return res;
|
|
2582
|
+
}
|
|
2583
|
+
for (const n of data.templateSpans) {
|
|
2584
|
+
const res = yield n;
|
|
2585
|
+
if (res)
|
|
2586
|
+
return res;
|
|
2587
|
+
}
|
|
2588
|
+
},
|
|
2589
|
+
[SyntaxKind.TemplateSpan]: function* (data) {
|
|
2590
|
+
if (data.expression) {
|
|
2591
|
+
const res = yield data.expression;
|
|
2592
|
+
if (res)
|
|
2593
|
+
return res;
|
|
2594
|
+
}
|
|
2595
|
+
if (data.literal) {
|
|
2596
|
+
const res = yield data.literal;
|
|
2597
|
+
if (res)
|
|
2598
|
+
return res;
|
|
2599
|
+
}
|
|
2600
|
+
},
|
|
2601
|
+
[SyntaxKind.TaggedTemplateExpression]: function* (data) {
|
|
2602
|
+
if (data.tag) {
|
|
2603
|
+
const res = yield data.tag;
|
|
2604
|
+
if (res)
|
|
2605
|
+
return res;
|
|
2606
|
+
}
|
|
2607
|
+
if (data.questionDotToken) {
|
|
2608
|
+
const res = yield data.questionDotToken;
|
|
2609
|
+
if (res)
|
|
2610
|
+
return res;
|
|
2611
|
+
}
|
|
2612
|
+
if (data.typeArguments) {
|
|
2613
|
+
for (const n of data.typeArguments) {
|
|
2614
|
+
const res = yield n;
|
|
2615
|
+
if (res)
|
|
2616
|
+
return res;
|
|
2617
|
+
}
|
|
2618
|
+
}
|
|
2619
|
+
if (data.template) {
|
|
2620
|
+
const res = yield data.template;
|
|
2621
|
+
if (res)
|
|
2622
|
+
return res;
|
|
2623
|
+
}
|
|
2624
|
+
},
|
|
2625
|
+
[SyntaxKind.ParenthesizedExpression]: function* (data) {
|
|
2626
|
+
if (data.expression) {
|
|
2627
|
+
const res = yield data.expression;
|
|
2628
|
+
if (res)
|
|
2629
|
+
return res;
|
|
2630
|
+
}
|
|
2631
|
+
},
|
|
2632
|
+
[SyntaxKind.ArrayLiteralExpression]: function* (data) {
|
|
2633
|
+
for (const n of data.elements) {
|
|
2634
|
+
const res = yield n;
|
|
2635
|
+
if (res)
|
|
2636
|
+
return res;
|
|
2637
|
+
}
|
|
2638
|
+
},
|
|
2639
|
+
[SyntaxKind.ObjectLiteralExpression]: function* (data) {
|
|
2640
|
+
for (const n of data.properties) {
|
|
2641
|
+
const res = yield n;
|
|
2642
|
+
if (res)
|
|
2643
|
+
return res;
|
|
2644
|
+
}
|
|
2645
|
+
},
|
|
2646
|
+
[SyntaxKind.SpreadAssignment]: function* (data) {
|
|
2647
|
+
if (data.expression) {
|
|
2648
|
+
const res = yield data.expression;
|
|
2649
|
+
if (res)
|
|
2650
|
+
return res;
|
|
2651
|
+
}
|
|
2652
|
+
},
|
|
2653
|
+
[SyntaxKind.PropertyAssignment]: function* (data) {
|
|
2654
|
+
if (data.modifiers) {
|
|
2655
|
+
for (const n of data.modifiers) {
|
|
2656
|
+
const res = yield n;
|
|
2657
|
+
if (res)
|
|
2658
|
+
return res;
|
|
2659
|
+
}
|
|
2660
|
+
}
|
|
2661
|
+
if (data.name) {
|
|
2662
|
+
const res = yield data.name;
|
|
2663
|
+
if (res)
|
|
2664
|
+
return res;
|
|
2665
|
+
}
|
|
2666
|
+
if (data.postfixToken) {
|
|
2667
|
+
const res = yield data.postfixToken;
|
|
2668
|
+
if (res)
|
|
2669
|
+
return res;
|
|
2670
|
+
}
|
|
2671
|
+
if (data.type) {
|
|
2672
|
+
const res = yield data.type;
|
|
2673
|
+
if (res)
|
|
2674
|
+
return res;
|
|
2675
|
+
}
|
|
2676
|
+
if (data.initializer) {
|
|
2677
|
+
const res = yield data.initializer;
|
|
2678
|
+
if (res)
|
|
2679
|
+
return res;
|
|
2680
|
+
}
|
|
2681
|
+
},
|
|
2682
|
+
[SyntaxKind.ShorthandPropertyAssignment]: function* (data) {
|
|
2683
|
+
if (data.modifiers) {
|
|
2684
|
+
for (const n of data.modifiers) {
|
|
2685
|
+
const res = yield n;
|
|
2686
|
+
if (res)
|
|
2687
|
+
return res;
|
|
2688
|
+
}
|
|
2689
|
+
}
|
|
2690
|
+
if (data.name) {
|
|
2691
|
+
const res = yield data.name;
|
|
2692
|
+
if (res)
|
|
2693
|
+
return res;
|
|
2694
|
+
}
|
|
2695
|
+
if (data.postfixToken) {
|
|
2696
|
+
const res = yield data.postfixToken;
|
|
2697
|
+
if (res)
|
|
2698
|
+
return res;
|
|
2699
|
+
}
|
|
2700
|
+
if (data.type) {
|
|
2701
|
+
const res = yield data.type;
|
|
2702
|
+
if (res)
|
|
2703
|
+
return res;
|
|
2704
|
+
}
|
|
2705
|
+
if (data.equalsToken) {
|
|
2706
|
+
const res = yield data.equalsToken;
|
|
2707
|
+
if (res)
|
|
2708
|
+
return res;
|
|
2709
|
+
}
|
|
2710
|
+
if (data.objectAssignmentInitializer) {
|
|
2711
|
+
const res = yield data.objectAssignmentInitializer;
|
|
2712
|
+
if (res)
|
|
2713
|
+
return res;
|
|
2714
|
+
}
|
|
2715
|
+
},
|
|
2716
|
+
[SyntaxKind.DeleteExpression]: function* (data) {
|
|
2717
|
+
if (data.expression) {
|
|
2718
|
+
const res = yield data.expression;
|
|
2719
|
+
if (res)
|
|
2720
|
+
return res;
|
|
2721
|
+
}
|
|
2722
|
+
},
|
|
2723
|
+
[SyntaxKind.TypeOfExpression]: function* (data) {
|
|
2724
|
+
if (data.expression) {
|
|
2725
|
+
const res = yield data.expression;
|
|
2726
|
+
if (res)
|
|
2727
|
+
return res;
|
|
2728
|
+
}
|
|
2729
|
+
},
|
|
2730
|
+
[SyntaxKind.VoidExpression]: function* (data) {
|
|
2731
|
+
if (data.expression) {
|
|
2732
|
+
const res = yield data.expression;
|
|
2733
|
+
if (res)
|
|
2734
|
+
return res;
|
|
2735
|
+
}
|
|
2736
|
+
},
|
|
2737
|
+
[SyntaxKind.AwaitExpression]: function* (data) {
|
|
2738
|
+
if (data.expression) {
|
|
2739
|
+
const res = yield data.expression;
|
|
2740
|
+
if (res)
|
|
2741
|
+
return res;
|
|
2742
|
+
}
|
|
2743
|
+
},
|
|
2744
|
+
[SyntaxKind.TypeAssertionExpression]: function* (data) {
|
|
2745
|
+
if (data.type) {
|
|
2746
|
+
const res = yield data.type;
|
|
2747
|
+
if (res)
|
|
2748
|
+
return res;
|
|
2749
|
+
}
|
|
2750
|
+
if (data.expression) {
|
|
2751
|
+
const res = yield data.expression;
|
|
2752
|
+
if (res)
|
|
2753
|
+
return res;
|
|
2754
|
+
}
|
|
2755
|
+
},
|
|
2756
|
+
[SyntaxKind.UnionType]: function* (data) {
|
|
2757
|
+
for (const n of data.types) {
|
|
2758
|
+
const res = yield n;
|
|
2759
|
+
if (res)
|
|
2760
|
+
return res;
|
|
2761
|
+
}
|
|
2762
|
+
},
|
|
2763
|
+
[SyntaxKind.IntersectionType]: function* (data) {
|
|
2764
|
+
for (const n of data.types) {
|
|
2765
|
+
const res = yield n;
|
|
2766
|
+
if (res)
|
|
2767
|
+
return res;
|
|
2768
|
+
}
|
|
2769
|
+
},
|
|
2770
|
+
[SyntaxKind.ConditionalType]: function* (data) {
|
|
2771
|
+
if (data.checkType) {
|
|
2772
|
+
const res = yield data.checkType;
|
|
2773
|
+
if (res)
|
|
2774
|
+
return res;
|
|
2775
|
+
}
|
|
2776
|
+
if (data.extendsType) {
|
|
2777
|
+
const res = yield data.extendsType;
|
|
2778
|
+
if (res)
|
|
2779
|
+
return res;
|
|
2780
|
+
}
|
|
2781
|
+
if (data.trueType) {
|
|
2782
|
+
const res = yield data.trueType;
|
|
2783
|
+
if (res)
|
|
2784
|
+
return res;
|
|
2785
|
+
}
|
|
2786
|
+
if (data.falseType) {
|
|
2787
|
+
const res = yield data.falseType;
|
|
2788
|
+
if (res)
|
|
2789
|
+
return res;
|
|
2790
|
+
}
|
|
2791
|
+
},
|
|
2792
|
+
[SyntaxKind.TypeOperator]: function* (data) {
|
|
2793
|
+
if (data.type) {
|
|
2794
|
+
const res = yield data.type;
|
|
2795
|
+
if (res)
|
|
2796
|
+
return res;
|
|
2797
|
+
}
|
|
2798
|
+
},
|
|
2799
|
+
[SyntaxKind.InferType]: function* (data) {
|
|
2800
|
+
if (data.typeParameter) {
|
|
2801
|
+
const res = yield data.typeParameter;
|
|
2802
|
+
if (res)
|
|
2803
|
+
return res;
|
|
2804
|
+
}
|
|
2805
|
+
},
|
|
2806
|
+
[SyntaxKind.ArrayType]: function* (data) {
|
|
2807
|
+
if (data.elementType) {
|
|
2808
|
+
const res = yield data.elementType;
|
|
2809
|
+
if (res)
|
|
2810
|
+
return res;
|
|
2811
|
+
}
|
|
2812
|
+
},
|
|
2813
|
+
[SyntaxKind.IndexedAccessType]: function* (data) {
|
|
2814
|
+
if (data.objectType) {
|
|
2815
|
+
const res = yield data.objectType;
|
|
2816
|
+
if (res)
|
|
2817
|
+
return res;
|
|
2818
|
+
}
|
|
2819
|
+
if (data.indexType) {
|
|
2820
|
+
const res = yield data.indexType;
|
|
2821
|
+
if (res)
|
|
2822
|
+
return res;
|
|
2823
|
+
}
|
|
2824
|
+
},
|
|
2825
|
+
[SyntaxKind.TypeReference]: function* (data) {
|
|
2826
|
+
if (data.typeName) {
|
|
2827
|
+
const res = yield data.typeName;
|
|
2828
|
+
if (res)
|
|
2829
|
+
return res;
|
|
2830
|
+
}
|
|
2831
|
+
if (data.typeArguments) {
|
|
2832
|
+
for (const n of data.typeArguments) {
|
|
2833
|
+
const res = yield n;
|
|
2834
|
+
if (res)
|
|
2835
|
+
return res;
|
|
2836
|
+
}
|
|
2837
|
+
}
|
|
2838
|
+
},
|
|
2839
|
+
[SyntaxKind.ExpressionWithTypeArguments]: function* (data) {
|
|
2840
|
+
if (data.expression) {
|
|
2841
|
+
const res = yield data.expression;
|
|
2842
|
+
if (res)
|
|
2843
|
+
return res;
|
|
2844
|
+
}
|
|
2845
|
+
if (data.typeArguments) {
|
|
2846
|
+
for (const n of data.typeArguments) {
|
|
2847
|
+
const res = yield n;
|
|
2848
|
+
if (res)
|
|
2849
|
+
return res;
|
|
2850
|
+
}
|
|
2851
|
+
}
|
|
2852
|
+
},
|
|
2853
|
+
[SyntaxKind.LiteralType]: function* (data) {
|
|
2854
|
+
if (data.literal) {
|
|
2855
|
+
const res = yield data.literal;
|
|
2856
|
+
if (res)
|
|
2857
|
+
return res;
|
|
2858
|
+
}
|
|
2859
|
+
},
|
|
2860
|
+
[SyntaxKind.TypePredicate]: function* (data) {
|
|
2861
|
+
if (data.assertsModifier) {
|
|
2862
|
+
const res = yield data.assertsModifier;
|
|
2863
|
+
if (res)
|
|
2864
|
+
return res;
|
|
2865
|
+
}
|
|
2866
|
+
if (data.parameterName) {
|
|
2867
|
+
const res = yield data.parameterName;
|
|
2868
|
+
if (res)
|
|
2869
|
+
return res;
|
|
2870
|
+
}
|
|
2871
|
+
if (data.type) {
|
|
2872
|
+
const res = yield data.type;
|
|
2873
|
+
if (res)
|
|
2874
|
+
return res;
|
|
2875
|
+
}
|
|
2876
|
+
},
|
|
2877
|
+
[SyntaxKind.ImportAttribute]: function* (data) {
|
|
2878
|
+
if (data.name) {
|
|
2879
|
+
const res = yield data.name;
|
|
2880
|
+
if (res)
|
|
2881
|
+
return res;
|
|
2882
|
+
}
|
|
2883
|
+
if (data.value) {
|
|
2884
|
+
const res = yield data.value;
|
|
2885
|
+
if (res)
|
|
2886
|
+
return res;
|
|
2887
|
+
}
|
|
2888
|
+
},
|
|
2889
|
+
[SyntaxKind.ImportAttributes]: function* (data) {
|
|
2890
|
+
for (const n of data.attributes) {
|
|
2891
|
+
const res = yield n;
|
|
2892
|
+
if (res)
|
|
2893
|
+
return res;
|
|
2894
|
+
}
|
|
2895
|
+
},
|
|
2896
|
+
[SyntaxKind.TypeQuery]: function* (data) {
|
|
2897
|
+
if (data.exprName) {
|
|
2898
|
+
const res = yield data.exprName;
|
|
2899
|
+
if (res)
|
|
2900
|
+
return res;
|
|
2901
|
+
}
|
|
2902
|
+
if (data.typeArguments) {
|
|
2903
|
+
for (const n of data.typeArguments) {
|
|
2904
|
+
const res = yield n;
|
|
2905
|
+
if (res)
|
|
2906
|
+
return res;
|
|
2907
|
+
}
|
|
2908
|
+
}
|
|
2909
|
+
},
|
|
2910
|
+
[SyntaxKind.MappedType]: function* (data) {
|
|
2911
|
+
if (data.readonlyToken) {
|
|
2912
|
+
const res = yield data.readonlyToken;
|
|
2913
|
+
if (res)
|
|
2914
|
+
return res;
|
|
2915
|
+
}
|
|
2916
|
+
if (data.typeParameter) {
|
|
2917
|
+
const res = yield data.typeParameter;
|
|
2918
|
+
if (res)
|
|
2919
|
+
return res;
|
|
2920
|
+
}
|
|
2921
|
+
if (data.nameType) {
|
|
2922
|
+
const res = yield data.nameType;
|
|
2923
|
+
if (res)
|
|
2924
|
+
return res;
|
|
2925
|
+
}
|
|
2926
|
+
if (data.questionToken) {
|
|
2927
|
+
const res = yield data.questionToken;
|
|
2928
|
+
if (res)
|
|
2929
|
+
return res;
|
|
2930
|
+
}
|
|
2931
|
+
if (data.type) {
|
|
2932
|
+
const res = yield data.type;
|
|
2933
|
+
if (res)
|
|
2934
|
+
return res;
|
|
2935
|
+
}
|
|
2936
|
+
if (data.members) {
|
|
2937
|
+
for (const n of data.members) {
|
|
2938
|
+
const res = yield n;
|
|
2939
|
+
if (res)
|
|
2940
|
+
return res;
|
|
2941
|
+
}
|
|
2942
|
+
}
|
|
2943
|
+
},
|
|
2944
|
+
[SyntaxKind.TypeLiteral]: function* (data) {
|
|
2945
|
+
for (const n of data.members) {
|
|
2946
|
+
const res = yield n;
|
|
2947
|
+
if (res)
|
|
2948
|
+
return res;
|
|
2949
|
+
}
|
|
2950
|
+
},
|
|
2951
|
+
[SyntaxKind.TupleType]: function* (data) {
|
|
2952
|
+
for (const n of data.elements) {
|
|
2953
|
+
const res = yield n;
|
|
2954
|
+
if (res)
|
|
2955
|
+
return res;
|
|
2956
|
+
}
|
|
2957
|
+
},
|
|
2958
|
+
[SyntaxKind.NamedTupleMember]: function* (data) {
|
|
2959
|
+
if (data.dotDotDotToken) {
|
|
2960
|
+
const res = yield data.dotDotDotToken;
|
|
2961
|
+
if (res)
|
|
2962
|
+
return res;
|
|
2963
|
+
}
|
|
2964
|
+
if (data.name) {
|
|
2965
|
+
const res = yield data.name;
|
|
2966
|
+
if (res)
|
|
2967
|
+
return res;
|
|
2968
|
+
}
|
|
2969
|
+
if (data.questionToken) {
|
|
2970
|
+
const res = yield data.questionToken;
|
|
2971
|
+
if (res)
|
|
2972
|
+
return res;
|
|
2973
|
+
}
|
|
2974
|
+
if (data.type) {
|
|
2975
|
+
const res = yield data.type;
|
|
2976
|
+
if (res)
|
|
2977
|
+
return res;
|
|
2978
|
+
}
|
|
2979
|
+
},
|
|
2980
|
+
[SyntaxKind.OptionalType]: function* (data) {
|
|
2981
|
+
if (data.type) {
|
|
2982
|
+
const res = yield data.type;
|
|
2983
|
+
if (res)
|
|
2984
|
+
return res;
|
|
2985
|
+
}
|
|
2986
|
+
},
|
|
2987
|
+
[SyntaxKind.RestType]: function* (data) {
|
|
2988
|
+
if (data.type) {
|
|
2989
|
+
const res = yield data.type;
|
|
2990
|
+
if (res)
|
|
2991
|
+
return res;
|
|
2992
|
+
}
|
|
2993
|
+
},
|
|
2994
|
+
[SyntaxKind.ParenthesizedType]: function* (data) {
|
|
2995
|
+
if (data.type) {
|
|
2996
|
+
const res = yield data.type;
|
|
2997
|
+
if (res)
|
|
2998
|
+
return res;
|
|
2999
|
+
}
|
|
3000
|
+
},
|
|
3001
|
+
[SyntaxKind.FunctionType]: function* (data) {
|
|
3002
|
+
if (data.typeParameters) {
|
|
3003
|
+
for (const n of data.typeParameters) {
|
|
3004
|
+
const res = yield n;
|
|
3005
|
+
if (res)
|
|
3006
|
+
return res;
|
|
3007
|
+
}
|
|
3008
|
+
}
|
|
3009
|
+
for (const n of data.parameters) {
|
|
3010
|
+
const res = yield n;
|
|
3011
|
+
if (res)
|
|
3012
|
+
return res;
|
|
3013
|
+
}
|
|
3014
|
+
if (data.type) {
|
|
3015
|
+
const res = yield data.type;
|
|
3016
|
+
if (res)
|
|
3017
|
+
return res;
|
|
3018
|
+
}
|
|
3019
|
+
},
|
|
3020
|
+
[SyntaxKind.ConstructorType]: function* (data) {
|
|
3021
|
+
if (data.modifiers) {
|
|
3022
|
+
for (const n of data.modifiers) {
|
|
3023
|
+
const res = yield n;
|
|
3024
|
+
if (res)
|
|
3025
|
+
return res;
|
|
3026
|
+
}
|
|
3027
|
+
}
|
|
3028
|
+
if (data.typeParameters) {
|
|
3029
|
+
for (const n of data.typeParameters) {
|
|
3030
|
+
const res = yield n;
|
|
3031
|
+
if (res)
|
|
3032
|
+
return res;
|
|
3033
|
+
}
|
|
3034
|
+
}
|
|
3035
|
+
for (const n of data.parameters) {
|
|
3036
|
+
const res = yield n;
|
|
3037
|
+
if (res)
|
|
3038
|
+
return res;
|
|
3039
|
+
}
|
|
3040
|
+
if (data.type) {
|
|
3041
|
+
const res = yield data.type;
|
|
3042
|
+
if (res)
|
|
3043
|
+
return res;
|
|
3044
|
+
}
|
|
3045
|
+
},
|
|
3046
|
+
[SyntaxKind.TemplateLiteralType]: function* (data) {
|
|
3047
|
+
if (data.head) {
|
|
3048
|
+
const res = yield data.head;
|
|
3049
|
+
if (res)
|
|
3050
|
+
return res;
|
|
3051
|
+
}
|
|
3052
|
+
for (const n of data.templateSpans) {
|
|
3053
|
+
const res = yield n;
|
|
3054
|
+
if (res)
|
|
3055
|
+
return res;
|
|
3056
|
+
}
|
|
3057
|
+
},
|
|
3058
|
+
[SyntaxKind.TemplateLiteralTypeSpan]: function* (data) {
|
|
3059
|
+
if (data.type) {
|
|
3060
|
+
const res = yield data.type;
|
|
3061
|
+
if (res)
|
|
3062
|
+
return res;
|
|
3063
|
+
}
|
|
3064
|
+
if (data.literal) {
|
|
3065
|
+
const res = yield data.literal;
|
|
3066
|
+
if (res)
|
|
3067
|
+
return res;
|
|
3068
|
+
}
|
|
3069
|
+
},
|
|
3070
|
+
[SyntaxKind.SyntheticExpression]: function* (data) {
|
|
3071
|
+
if (data.tupleNameSource) {
|
|
3072
|
+
const res = yield data.tupleNameSource;
|
|
3073
|
+
if (res)
|
|
3074
|
+
return res;
|
|
3075
|
+
}
|
|
3076
|
+
},
|
|
3077
|
+
[SyntaxKind.PartiallyEmittedExpression]: function* (data) {
|
|
3078
|
+
if (data.expression) {
|
|
3079
|
+
const res = yield data.expression;
|
|
3080
|
+
if (res)
|
|
3081
|
+
return res;
|
|
3082
|
+
}
|
|
3083
|
+
},
|
|
3084
|
+
[SyntaxKind.JsxElement]: function* (data) {
|
|
3085
|
+
if (data.openingElement) {
|
|
3086
|
+
const res = yield data.openingElement;
|
|
3087
|
+
if (res)
|
|
3088
|
+
return res;
|
|
3089
|
+
}
|
|
3090
|
+
for (const n of data.children) {
|
|
3091
|
+
const res = yield n;
|
|
3092
|
+
if (res)
|
|
3093
|
+
return res;
|
|
3094
|
+
}
|
|
3095
|
+
if (data.closingElement) {
|
|
3096
|
+
const res = yield data.closingElement;
|
|
3097
|
+
if (res)
|
|
3098
|
+
return res;
|
|
3099
|
+
}
|
|
3100
|
+
},
|
|
3101
|
+
[SyntaxKind.JsxAttributes]: function* (data) {
|
|
3102
|
+
for (const n of data.properties) {
|
|
3103
|
+
const res = yield n;
|
|
3104
|
+
if (res)
|
|
3105
|
+
return res;
|
|
3106
|
+
}
|
|
3107
|
+
},
|
|
3108
|
+
[SyntaxKind.JsxNamespacedName]: function* (data) {
|
|
3109
|
+
if (data.namespace) {
|
|
3110
|
+
const res = yield data.namespace;
|
|
3111
|
+
if (res)
|
|
3112
|
+
return res;
|
|
3113
|
+
}
|
|
3114
|
+
if (data.name) {
|
|
3115
|
+
const res = yield data.name;
|
|
3116
|
+
if (res)
|
|
3117
|
+
return res;
|
|
3118
|
+
}
|
|
3119
|
+
},
|
|
3120
|
+
[SyntaxKind.JsxOpeningElement]: function* (data) {
|
|
3121
|
+
if (data.tagName) {
|
|
3122
|
+
const res = yield data.tagName;
|
|
3123
|
+
if (res)
|
|
3124
|
+
return res;
|
|
3125
|
+
}
|
|
3126
|
+
if (data.typeArguments) {
|
|
3127
|
+
for (const n of data.typeArguments) {
|
|
3128
|
+
const res = yield n;
|
|
3129
|
+
if (res)
|
|
3130
|
+
return res;
|
|
3131
|
+
}
|
|
3132
|
+
}
|
|
3133
|
+
if (data.attributes) {
|
|
3134
|
+
const res = yield data.attributes;
|
|
3135
|
+
if (res)
|
|
3136
|
+
return res;
|
|
3137
|
+
}
|
|
3138
|
+
},
|
|
3139
|
+
[SyntaxKind.JsxSelfClosingElement]: function* (data) {
|
|
3140
|
+
if (data.tagName) {
|
|
3141
|
+
const res = yield data.tagName;
|
|
3142
|
+
if (res)
|
|
3143
|
+
return res;
|
|
3144
|
+
}
|
|
3145
|
+
if (data.typeArguments) {
|
|
3146
|
+
for (const n of data.typeArguments) {
|
|
3147
|
+
const res = yield n;
|
|
3148
|
+
if (res)
|
|
3149
|
+
return res;
|
|
3150
|
+
}
|
|
3151
|
+
}
|
|
3152
|
+
if (data.attributes) {
|
|
3153
|
+
const res = yield data.attributes;
|
|
3154
|
+
if (res)
|
|
3155
|
+
return res;
|
|
3156
|
+
}
|
|
3157
|
+
},
|
|
3158
|
+
[SyntaxKind.JsxFragment]: function* (data) {
|
|
3159
|
+
if (data.openingFragment) {
|
|
3160
|
+
const res = yield data.openingFragment;
|
|
3161
|
+
if (res)
|
|
3162
|
+
return res;
|
|
3163
|
+
}
|
|
3164
|
+
for (const n of data.children) {
|
|
3165
|
+
const res = yield n;
|
|
3166
|
+
if (res)
|
|
3167
|
+
return res;
|
|
3168
|
+
}
|
|
3169
|
+
if (data.closingFragment) {
|
|
3170
|
+
const res = yield data.closingFragment;
|
|
3171
|
+
if (res)
|
|
3172
|
+
return res;
|
|
3173
|
+
}
|
|
3174
|
+
},
|
|
3175
|
+
[SyntaxKind.JsxAttribute]: function* (data) {
|
|
3176
|
+
if (data.name) {
|
|
3177
|
+
const res = yield data.name;
|
|
3178
|
+
if (res)
|
|
3179
|
+
return res;
|
|
3180
|
+
}
|
|
3181
|
+
if (data.initializer) {
|
|
3182
|
+
const res = yield data.initializer;
|
|
3183
|
+
if (res)
|
|
3184
|
+
return res;
|
|
3185
|
+
}
|
|
3186
|
+
},
|
|
3187
|
+
[SyntaxKind.JsxSpreadAttribute]: function* (data) {
|
|
3188
|
+
if (data.expression) {
|
|
3189
|
+
const res = yield data.expression;
|
|
3190
|
+
if (res)
|
|
3191
|
+
return res;
|
|
3192
|
+
}
|
|
3193
|
+
},
|
|
3194
|
+
[SyntaxKind.JsxClosingElement]: function* (data) {
|
|
3195
|
+
if (data.tagName) {
|
|
3196
|
+
const res = yield data.tagName;
|
|
3197
|
+
if (res)
|
|
3198
|
+
return res;
|
|
3199
|
+
}
|
|
3200
|
+
},
|
|
3201
|
+
[SyntaxKind.JsxExpression]: function* (data) {
|
|
3202
|
+
if (data.dotDotDotToken) {
|
|
3203
|
+
const res = yield data.dotDotDotToken;
|
|
3204
|
+
if (res)
|
|
3205
|
+
return res;
|
|
3206
|
+
}
|
|
3207
|
+
if (data.expression) {
|
|
3208
|
+
const res = yield data.expression;
|
|
3209
|
+
if (res)
|
|
3210
|
+
return res;
|
|
3211
|
+
}
|
|
3212
|
+
},
|
|
3213
|
+
[SyntaxKind.SyntaxList]: function* (data) {
|
|
3214
|
+
for (const n of data.children) {
|
|
3215
|
+
const res = yield n;
|
|
3216
|
+
if (res)
|
|
3217
|
+
return res;
|
|
3218
|
+
}
|
|
3219
|
+
},
|
|
3220
|
+
[SyntaxKind.JSDoc]: function* (data) {
|
|
3221
|
+
for (const n of data.comment) {
|
|
3222
|
+
const res = yield n;
|
|
3223
|
+
if (res)
|
|
3224
|
+
return res;
|
|
3225
|
+
}
|
|
3226
|
+
if (data.tags) {
|
|
3227
|
+
for (const n of data.tags) {
|
|
3228
|
+
const res = yield n;
|
|
3229
|
+
if (res)
|
|
3230
|
+
return res;
|
|
3231
|
+
}
|
|
3232
|
+
}
|
|
3233
|
+
},
|
|
3234
|
+
[SyntaxKind.JSDocTypeExpression]: function* (data) {
|
|
3235
|
+
if (data.type) {
|
|
3236
|
+
const res = yield data.type;
|
|
3237
|
+
if (res)
|
|
3238
|
+
return res;
|
|
3239
|
+
}
|
|
3240
|
+
},
|
|
3241
|
+
[SyntaxKind.JSDocNonNullableType]: function* (data) {
|
|
3242
|
+
if (data.type) {
|
|
3243
|
+
const res = yield data.type;
|
|
3244
|
+
if (res)
|
|
3245
|
+
return res;
|
|
3246
|
+
}
|
|
3247
|
+
},
|
|
3248
|
+
[SyntaxKind.JSDocNullableType]: function* (data) {
|
|
3249
|
+
if (data.type) {
|
|
3250
|
+
const res = yield data.type;
|
|
3251
|
+
if (res)
|
|
3252
|
+
return res;
|
|
3253
|
+
}
|
|
3254
|
+
},
|
|
3255
|
+
[SyntaxKind.JSDocVariadicType]: function* (data) {
|
|
3256
|
+
if (data.type) {
|
|
3257
|
+
const res = yield data.type;
|
|
3258
|
+
if (res)
|
|
3259
|
+
return res;
|
|
3260
|
+
}
|
|
3261
|
+
},
|
|
3262
|
+
[SyntaxKind.JSDocOptionalType]: function* (data) {
|
|
3263
|
+
if (data.type) {
|
|
3264
|
+
const res = yield data.type;
|
|
3265
|
+
if (res)
|
|
3266
|
+
return res;
|
|
3267
|
+
}
|
|
3268
|
+
},
|
|
3269
|
+
[SyntaxKind.JSDocTypeTag]: function* (data) {
|
|
3270
|
+
if (data.tagName) {
|
|
3271
|
+
const res = yield data.tagName;
|
|
3272
|
+
if (res)
|
|
3273
|
+
return res;
|
|
3274
|
+
}
|
|
3275
|
+
if (data.typeExpression) {
|
|
3276
|
+
const res = yield data.typeExpression;
|
|
3277
|
+
if (res)
|
|
3278
|
+
return res;
|
|
3279
|
+
}
|
|
3280
|
+
if (data.comment) {
|
|
3281
|
+
for (const n of data.comment) {
|
|
3282
|
+
const res = yield n;
|
|
3283
|
+
if (res)
|
|
3284
|
+
return res;
|
|
3285
|
+
}
|
|
3286
|
+
}
|
|
3287
|
+
},
|
|
3288
|
+
[SyntaxKind.JSDocUnknownTag]: function* (data) {
|
|
3289
|
+
if (data.tagName) {
|
|
3290
|
+
const res = yield data.tagName;
|
|
3291
|
+
if (res)
|
|
3292
|
+
return res;
|
|
3293
|
+
}
|
|
3294
|
+
if (data.comment) {
|
|
3295
|
+
for (const n of data.comment) {
|
|
3296
|
+
const res = yield n;
|
|
3297
|
+
if (res)
|
|
3298
|
+
return res;
|
|
3299
|
+
}
|
|
3300
|
+
}
|
|
3301
|
+
},
|
|
3302
|
+
[SyntaxKind.JSDocTemplateTag]: function* (data) {
|
|
3303
|
+
if (data.tagName) {
|
|
3304
|
+
const res = yield data.tagName;
|
|
3305
|
+
if (res)
|
|
3306
|
+
return res;
|
|
3307
|
+
}
|
|
3308
|
+
if (data.constraint) {
|
|
3309
|
+
const res = yield data.constraint;
|
|
3310
|
+
if (res)
|
|
3311
|
+
return res;
|
|
3312
|
+
}
|
|
3313
|
+
for (const n of data.typeParameters) {
|
|
3314
|
+
const res = yield n;
|
|
3315
|
+
if (res)
|
|
3316
|
+
return res;
|
|
3317
|
+
}
|
|
3318
|
+
if (data.comment) {
|
|
3319
|
+
for (const n of data.comment) {
|
|
3320
|
+
const res = yield n;
|
|
3321
|
+
if (res)
|
|
3322
|
+
return res;
|
|
3323
|
+
}
|
|
3324
|
+
}
|
|
3325
|
+
},
|
|
3326
|
+
[SyntaxKind.JSDocReturnTag]: function* (data) {
|
|
3327
|
+
if (data.tagName) {
|
|
3328
|
+
const res = yield data.tagName;
|
|
3329
|
+
if (res)
|
|
3330
|
+
return res;
|
|
3331
|
+
}
|
|
3332
|
+
if (data.typeExpression) {
|
|
3333
|
+
const res = yield data.typeExpression;
|
|
3334
|
+
if (res)
|
|
3335
|
+
return res;
|
|
3336
|
+
}
|
|
3337
|
+
if (data.comment) {
|
|
3338
|
+
for (const n of data.comment) {
|
|
3339
|
+
const res = yield n;
|
|
3340
|
+
if (res)
|
|
3341
|
+
return res;
|
|
3342
|
+
}
|
|
3343
|
+
}
|
|
3344
|
+
},
|
|
3345
|
+
[SyntaxKind.JSDocPublicTag]: function* (data) {
|
|
3346
|
+
if (data.tagName) {
|
|
3347
|
+
const res = yield data.tagName;
|
|
3348
|
+
if (res)
|
|
3349
|
+
return res;
|
|
3350
|
+
}
|
|
3351
|
+
if (data.comment) {
|
|
3352
|
+
for (const n of data.comment) {
|
|
3353
|
+
const res = yield n;
|
|
3354
|
+
if (res)
|
|
3355
|
+
return res;
|
|
3356
|
+
}
|
|
3357
|
+
}
|
|
3358
|
+
},
|
|
3359
|
+
[SyntaxKind.JSDocPrivateTag]: function* (data) {
|
|
3360
|
+
if (data.tagName) {
|
|
3361
|
+
const res = yield data.tagName;
|
|
3362
|
+
if (res)
|
|
3363
|
+
return res;
|
|
3364
|
+
}
|
|
3365
|
+
if (data.comment) {
|
|
3366
|
+
for (const n of data.comment) {
|
|
3367
|
+
const res = yield n;
|
|
3368
|
+
if (res)
|
|
3369
|
+
return res;
|
|
3370
|
+
}
|
|
3371
|
+
}
|
|
3372
|
+
},
|
|
3373
|
+
[SyntaxKind.JSDocProtectedTag]: function* (data) {
|
|
3374
|
+
if (data.tagName) {
|
|
3375
|
+
const res = yield data.tagName;
|
|
3376
|
+
if (res)
|
|
3377
|
+
return res;
|
|
3378
|
+
}
|
|
3379
|
+
if (data.comment) {
|
|
3380
|
+
for (const n of data.comment) {
|
|
3381
|
+
const res = yield n;
|
|
3382
|
+
if (res)
|
|
3383
|
+
return res;
|
|
3384
|
+
}
|
|
3385
|
+
}
|
|
3386
|
+
},
|
|
3387
|
+
[SyntaxKind.JSDocReadonlyTag]: function* (data) {
|
|
3388
|
+
if (data.tagName) {
|
|
3389
|
+
const res = yield data.tagName;
|
|
3390
|
+
if (res)
|
|
3391
|
+
return res;
|
|
3392
|
+
}
|
|
3393
|
+
if (data.comment) {
|
|
3394
|
+
for (const n of data.comment) {
|
|
3395
|
+
const res = yield n;
|
|
3396
|
+
if (res)
|
|
3397
|
+
return res;
|
|
3398
|
+
}
|
|
3399
|
+
}
|
|
3400
|
+
},
|
|
3401
|
+
[SyntaxKind.JSDocOverrideTag]: function* (data) {
|
|
3402
|
+
if (data.tagName) {
|
|
3403
|
+
const res = yield data.tagName;
|
|
3404
|
+
if (res)
|
|
3405
|
+
return res;
|
|
3406
|
+
}
|
|
3407
|
+
if (data.comment) {
|
|
3408
|
+
for (const n of data.comment) {
|
|
3409
|
+
const res = yield n;
|
|
3410
|
+
if (res)
|
|
3411
|
+
return res;
|
|
3412
|
+
}
|
|
3413
|
+
}
|
|
3414
|
+
},
|
|
3415
|
+
[SyntaxKind.JSDocDeprecatedTag]: function* (data) {
|
|
3416
|
+
if (data.tagName) {
|
|
3417
|
+
const res = yield data.tagName;
|
|
3418
|
+
if (res)
|
|
3419
|
+
return res;
|
|
3420
|
+
}
|
|
3421
|
+
if (data.comment) {
|
|
3422
|
+
for (const n of data.comment) {
|
|
3423
|
+
const res = yield n;
|
|
3424
|
+
if (res)
|
|
3425
|
+
return res;
|
|
3426
|
+
}
|
|
3427
|
+
}
|
|
3428
|
+
},
|
|
3429
|
+
[SyntaxKind.JSDocSeeTag]: function* (data) {
|
|
3430
|
+
if (data.tagName) {
|
|
3431
|
+
const res = yield data.tagName;
|
|
3432
|
+
if (res)
|
|
3433
|
+
return res;
|
|
3434
|
+
}
|
|
3435
|
+
if (data.nameExpression) {
|
|
3436
|
+
const res = yield data.nameExpression;
|
|
3437
|
+
if (res)
|
|
3438
|
+
return res;
|
|
3439
|
+
}
|
|
3440
|
+
if (data.comment) {
|
|
3441
|
+
for (const n of data.comment) {
|
|
3442
|
+
const res = yield n;
|
|
3443
|
+
if (res)
|
|
3444
|
+
return res;
|
|
3445
|
+
}
|
|
3446
|
+
}
|
|
3447
|
+
},
|
|
3448
|
+
[SyntaxKind.JSDocImplementsTag]: function* (data) {
|
|
3449
|
+
if (data.tagName) {
|
|
3450
|
+
const res = yield data.tagName;
|
|
3451
|
+
if (res)
|
|
3452
|
+
return res;
|
|
3453
|
+
}
|
|
3454
|
+
if (data.className) {
|
|
3455
|
+
const res = yield data.className;
|
|
3456
|
+
if (res)
|
|
3457
|
+
return res;
|
|
3458
|
+
}
|
|
3459
|
+
if (data.comment) {
|
|
3460
|
+
for (const n of data.comment) {
|
|
3461
|
+
const res = yield n;
|
|
3462
|
+
if (res)
|
|
3463
|
+
return res;
|
|
3464
|
+
}
|
|
3465
|
+
}
|
|
3466
|
+
},
|
|
3467
|
+
[SyntaxKind.JSDocAugmentsTag]: function* (data) {
|
|
3468
|
+
if (data.tagName) {
|
|
3469
|
+
const res = yield data.tagName;
|
|
3470
|
+
if (res)
|
|
3471
|
+
return res;
|
|
3472
|
+
}
|
|
3473
|
+
if (data.className) {
|
|
3474
|
+
const res = yield data.className;
|
|
3475
|
+
if (res)
|
|
3476
|
+
return res;
|
|
3477
|
+
}
|
|
3478
|
+
if (data.comment) {
|
|
3479
|
+
for (const n of data.comment) {
|
|
3480
|
+
const res = yield n;
|
|
3481
|
+
if (res)
|
|
3482
|
+
return res;
|
|
3483
|
+
}
|
|
3484
|
+
}
|
|
3485
|
+
},
|
|
3486
|
+
[SyntaxKind.JSDocSatisfiesTag]: function* (data) {
|
|
3487
|
+
if (data.tagName) {
|
|
3488
|
+
const res = yield data.tagName;
|
|
3489
|
+
if (res)
|
|
3490
|
+
return res;
|
|
3491
|
+
}
|
|
3492
|
+
if (data.typeExpression) {
|
|
3493
|
+
const res = yield data.typeExpression;
|
|
3494
|
+
if (res)
|
|
3495
|
+
return res;
|
|
3496
|
+
}
|
|
3497
|
+
if (data.comment) {
|
|
3498
|
+
for (const n of data.comment) {
|
|
3499
|
+
const res = yield n;
|
|
3500
|
+
if (res)
|
|
3501
|
+
return res;
|
|
3502
|
+
}
|
|
3503
|
+
}
|
|
3504
|
+
},
|
|
3505
|
+
[SyntaxKind.JSDocThrowsTag]: function* (data) {
|
|
3506
|
+
if (data.tagName) {
|
|
3507
|
+
const res = yield data.tagName;
|
|
3508
|
+
if (res)
|
|
3509
|
+
return res;
|
|
3510
|
+
}
|
|
3511
|
+
if (data.typeExpression) {
|
|
3512
|
+
const res = yield data.typeExpression;
|
|
3513
|
+
if (res)
|
|
3514
|
+
return res;
|
|
3515
|
+
}
|
|
3516
|
+
if (data.comment) {
|
|
3517
|
+
for (const n of data.comment) {
|
|
3518
|
+
const res = yield n;
|
|
3519
|
+
if (res)
|
|
3520
|
+
return res;
|
|
3521
|
+
}
|
|
3522
|
+
}
|
|
3523
|
+
},
|
|
3524
|
+
[SyntaxKind.JSDocThisTag]: function* (data) {
|
|
3525
|
+
if (data.tagName) {
|
|
3526
|
+
const res = yield data.tagName;
|
|
3527
|
+
if (res)
|
|
3528
|
+
return res;
|
|
3529
|
+
}
|
|
3530
|
+
if (data.typeExpression) {
|
|
3531
|
+
const res = yield data.typeExpression;
|
|
3532
|
+
if (res)
|
|
3533
|
+
return res;
|
|
3534
|
+
}
|
|
3535
|
+
if (data.comment) {
|
|
3536
|
+
for (const n of data.comment) {
|
|
3537
|
+
const res = yield n;
|
|
3538
|
+
if (res)
|
|
3539
|
+
return res;
|
|
3540
|
+
}
|
|
3541
|
+
}
|
|
3542
|
+
},
|
|
3543
|
+
[SyntaxKind.JSDocImportTag]: function* (data) {
|
|
3544
|
+
if (data.tagName) {
|
|
3545
|
+
const res = yield data.tagName;
|
|
3546
|
+
if (res)
|
|
3547
|
+
return res;
|
|
3548
|
+
}
|
|
3549
|
+
if (data.importClause) {
|
|
3550
|
+
const res = yield data.importClause;
|
|
3551
|
+
if (res)
|
|
3552
|
+
return res;
|
|
3553
|
+
}
|
|
3554
|
+
if (data.moduleSpecifier) {
|
|
3555
|
+
const res = yield data.moduleSpecifier;
|
|
3556
|
+
if (res)
|
|
3557
|
+
return res;
|
|
3558
|
+
}
|
|
3559
|
+
if (data.attributes) {
|
|
3560
|
+
const res = yield data.attributes;
|
|
3561
|
+
if (res)
|
|
3562
|
+
return res;
|
|
3563
|
+
}
|
|
3564
|
+
if (data.comment) {
|
|
3565
|
+
for (const n of data.comment) {
|
|
3566
|
+
const res = yield n;
|
|
3567
|
+
if (res)
|
|
3568
|
+
return res;
|
|
3569
|
+
}
|
|
3570
|
+
}
|
|
3571
|
+
},
|
|
3572
|
+
[SyntaxKind.JSDocCallbackTag]: function* (data) {
|
|
3573
|
+
if (data.tagName) {
|
|
3574
|
+
const res = yield data.tagName;
|
|
3575
|
+
if (res)
|
|
3576
|
+
return res;
|
|
3577
|
+
}
|
|
3578
|
+
if (data.typeExpression) {
|
|
3579
|
+
const res = yield data.typeExpression;
|
|
3580
|
+
if (res)
|
|
3581
|
+
return res;
|
|
3582
|
+
}
|
|
3583
|
+
if (data.name) {
|
|
3584
|
+
const res = yield data.name;
|
|
3585
|
+
if (res)
|
|
3586
|
+
return res;
|
|
3587
|
+
}
|
|
3588
|
+
if (data.comment) {
|
|
3589
|
+
for (const n of data.comment) {
|
|
3590
|
+
const res = yield n;
|
|
3591
|
+
if (res)
|
|
3592
|
+
return res;
|
|
3593
|
+
}
|
|
3594
|
+
}
|
|
3595
|
+
},
|
|
3596
|
+
[SyntaxKind.JSDocOverloadTag]: function* (data) {
|
|
3597
|
+
if (data.tagName) {
|
|
3598
|
+
const res = yield data.tagName;
|
|
3599
|
+
if (res)
|
|
3600
|
+
return res;
|
|
3601
|
+
}
|
|
3602
|
+
if (data.typeExpression) {
|
|
3603
|
+
const res = yield data.typeExpression;
|
|
3604
|
+
if (res)
|
|
3605
|
+
return res;
|
|
3606
|
+
}
|
|
3607
|
+
if (data.comment) {
|
|
3608
|
+
for (const n of data.comment) {
|
|
3609
|
+
const res = yield n;
|
|
3610
|
+
if (res)
|
|
3611
|
+
return res;
|
|
3612
|
+
}
|
|
3613
|
+
}
|
|
3614
|
+
},
|
|
3615
|
+
[SyntaxKind.JSDocTypedefTag]: function* (data) {
|
|
3616
|
+
if (data.tagName) {
|
|
3617
|
+
const res = yield data.tagName;
|
|
3618
|
+
if (res)
|
|
3619
|
+
return res;
|
|
3620
|
+
}
|
|
3621
|
+
if (data.typeExpression) {
|
|
3622
|
+
const res = yield data.typeExpression;
|
|
3623
|
+
if (res)
|
|
3624
|
+
return res;
|
|
3625
|
+
}
|
|
3626
|
+
if (data.name) {
|
|
3627
|
+
const res = yield data.name;
|
|
3628
|
+
if (res)
|
|
3629
|
+
return res;
|
|
3630
|
+
}
|
|
3631
|
+
if (data.comment) {
|
|
3632
|
+
for (const n of data.comment) {
|
|
3633
|
+
const res = yield n;
|
|
3634
|
+
if (res)
|
|
3635
|
+
return res;
|
|
3636
|
+
}
|
|
3637
|
+
}
|
|
3638
|
+
},
|
|
3639
|
+
[SyntaxKind.JSDocSignature]: function* (data) {
|
|
3640
|
+
if (data.typeParameters) {
|
|
3641
|
+
for (const n of data.typeParameters) {
|
|
3642
|
+
const res = yield n;
|
|
3643
|
+
if (res)
|
|
3644
|
+
return res;
|
|
3645
|
+
}
|
|
3646
|
+
}
|
|
3647
|
+
for (const n of data.parameters) {
|
|
3648
|
+
const res = yield n;
|
|
3649
|
+
if (res)
|
|
3650
|
+
return res;
|
|
3651
|
+
}
|
|
3652
|
+
if (data.type) {
|
|
3653
|
+
const res = yield data.type;
|
|
3654
|
+
if (res)
|
|
3655
|
+
return res;
|
|
3656
|
+
}
|
|
3657
|
+
},
|
|
3658
|
+
[SyntaxKind.JSDocNameReference]: function* (data) {
|
|
3659
|
+
if (data.name) {
|
|
3660
|
+
const res = yield data.name;
|
|
3661
|
+
if (res)
|
|
3662
|
+
return res;
|
|
3663
|
+
}
|
|
3664
|
+
},
|
|
3665
|
+
[SyntaxKind.ModuleDeclaration]: function* (data) {
|
|
3666
|
+
if (data.modifiers) {
|
|
3667
|
+
for (const n of data.modifiers) {
|
|
3668
|
+
const res = yield n;
|
|
3669
|
+
if (res)
|
|
3670
|
+
return res;
|
|
3671
|
+
}
|
|
3672
|
+
}
|
|
3673
|
+
if (data.name) {
|
|
3674
|
+
const res = yield data.name;
|
|
3675
|
+
if (res)
|
|
3676
|
+
return res;
|
|
3677
|
+
}
|
|
3678
|
+
if (data.attributes) {
|
|
3679
|
+
const res = yield data.attributes;
|
|
3680
|
+
if (res)
|
|
3681
|
+
return res;
|
|
3682
|
+
}
|
|
3683
|
+
if (data.body) {
|
|
3684
|
+
const res = yield data.body;
|
|
3685
|
+
if (res)
|
|
3686
|
+
return res;
|
|
3687
|
+
}
|
|
3688
|
+
},
|
|
3689
|
+
[SyntaxKind.ImportEqualsDeclaration]: function* (data) {
|
|
3690
|
+
if (data.modifiers) {
|
|
3691
|
+
for (const n of data.modifiers) {
|
|
3692
|
+
const res = yield n;
|
|
3693
|
+
if (res)
|
|
3694
|
+
return res;
|
|
3695
|
+
}
|
|
3696
|
+
}
|
|
3697
|
+
if (data.name) {
|
|
3698
|
+
const res = yield data.name;
|
|
3699
|
+
if (res)
|
|
3700
|
+
return res;
|
|
3701
|
+
}
|
|
3702
|
+
if (data.moduleReference) {
|
|
3703
|
+
const res = yield data.moduleReference;
|
|
3704
|
+
if (res)
|
|
3705
|
+
return res;
|
|
3706
|
+
}
|
|
3707
|
+
},
|
|
3708
|
+
[SyntaxKind.ExportDeclaration]: function* (data) {
|
|
3709
|
+
if (data.modifiers) {
|
|
3710
|
+
for (const n of data.modifiers) {
|
|
3711
|
+
const res = yield n;
|
|
3712
|
+
if (res)
|
|
3713
|
+
return res;
|
|
3714
|
+
}
|
|
3715
|
+
}
|
|
3716
|
+
if (data.exportClause) {
|
|
3717
|
+
const res = yield data.exportClause;
|
|
3718
|
+
if (res)
|
|
3719
|
+
return res;
|
|
3720
|
+
}
|
|
3721
|
+
if (data.moduleSpecifier) {
|
|
3722
|
+
const res = yield data.moduleSpecifier;
|
|
3723
|
+
if (res)
|
|
3724
|
+
return res;
|
|
3725
|
+
}
|
|
3726
|
+
if (data.attributes) {
|
|
3727
|
+
const res = yield data.attributes;
|
|
3728
|
+
if (res)
|
|
3729
|
+
return res;
|
|
3730
|
+
}
|
|
3731
|
+
},
|
|
3732
|
+
[SyntaxKind.ImportType]: function* (data) {
|
|
3733
|
+
if (data.argument) {
|
|
3734
|
+
const res = yield data.argument;
|
|
3735
|
+
if (res)
|
|
3736
|
+
return res;
|
|
3737
|
+
}
|
|
3738
|
+
if (data.attributes) {
|
|
3739
|
+
const res = yield data.attributes;
|
|
3740
|
+
if (res)
|
|
3741
|
+
return res;
|
|
3742
|
+
}
|
|
3743
|
+
if (data.qualifier) {
|
|
3744
|
+
const res = yield data.qualifier;
|
|
3745
|
+
if (res)
|
|
3746
|
+
return res;
|
|
3747
|
+
}
|
|
3748
|
+
if (data.typeArguments) {
|
|
3749
|
+
for (const n of data.typeArguments) {
|
|
3750
|
+
const res = yield n;
|
|
3751
|
+
if (res)
|
|
3752
|
+
return res;
|
|
3753
|
+
}
|
|
3754
|
+
}
|
|
3755
|
+
},
|
|
3756
|
+
[SyntaxKind.ImportClause]: function* (data) {
|
|
3757
|
+
if (data.name) {
|
|
3758
|
+
const res = yield data.name;
|
|
3759
|
+
if (res)
|
|
3760
|
+
return res;
|
|
3761
|
+
}
|
|
3762
|
+
if (data.namedBindings) {
|
|
3763
|
+
const res = yield data.namedBindings;
|
|
3764
|
+
if (res)
|
|
3765
|
+
return res;
|
|
3766
|
+
}
|
|
3767
|
+
},
|
|
3768
|
+
[SyntaxKind.ImportSpecifier]: function* (data) {
|
|
3769
|
+
if (data.propertyName) {
|
|
3770
|
+
const res = yield data.propertyName;
|
|
3771
|
+
if (res)
|
|
3772
|
+
return res;
|
|
3773
|
+
}
|
|
3774
|
+
if (data.name) {
|
|
3775
|
+
const res = yield data.name;
|
|
3776
|
+
if (res)
|
|
3777
|
+
return res;
|
|
3778
|
+
}
|
|
3779
|
+
},
|
|
3780
|
+
[SyntaxKind.JSDocLink]: function* (data) {
|
|
3781
|
+
if (data.name) {
|
|
3782
|
+
const res = yield data.name;
|
|
3783
|
+
if (res)
|
|
3784
|
+
return res;
|
|
3785
|
+
}
|
|
3786
|
+
},
|
|
3787
|
+
[SyntaxKind.JSDocLinkPlain]: function* (data) {
|
|
3788
|
+
if (data.name) {
|
|
3789
|
+
const res = yield data.name;
|
|
3790
|
+
if (res)
|
|
3791
|
+
return res;
|
|
3792
|
+
}
|
|
3793
|
+
},
|
|
3794
|
+
[SyntaxKind.JSDocLinkCode]: function* (data) {
|
|
3795
|
+
if (data.name) {
|
|
3796
|
+
const res = yield data.name;
|
|
3797
|
+
if (res)
|
|
3798
|
+
return res;
|
|
3799
|
+
}
|
|
3800
|
+
},
|
|
3801
|
+
[SyntaxKind.TypeParameter]: function* (data) {
|
|
3802
|
+
if (data.modifiers) {
|
|
3803
|
+
for (const n of data.modifiers) {
|
|
3804
|
+
const res = yield n;
|
|
3805
|
+
if (res)
|
|
3806
|
+
return res;
|
|
3807
|
+
}
|
|
3808
|
+
}
|
|
3809
|
+
if (data.name) {
|
|
3810
|
+
const res = yield data.name;
|
|
3811
|
+
if (res)
|
|
3812
|
+
return res;
|
|
3813
|
+
}
|
|
3814
|
+
if (data.constraint) {
|
|
3815
|
+
const res = yield data.constraint;
|
|
3816
|
+
if (res)
|
|
3817
|
+
return res;
|
|
3818
|
+
}
|
|
3819
|
+
if (data.expression) {
|
|
3820
|
+
const res = yield data.expression;
|
|
3821
|
+
if (res)
|
|
3822
|
+
return res;
|
|
3823
|
+
}
|
|
3824
|
+
if (data.defaultType) {
|
|
3825
|
+
const res = yield data.defaultType;
|
|
3826
|
+
if (res)
|
|
3827
|
+
return res;
|
|
3828
|
+
}
|
|
3829
|
+
},
|
|
3830
|
+
[SyntaxKind.SyntheticReferenceExpression]: function* (data) {
|
|
3831
|
+
if (data.expression) {
|
|
3832
|
+
const res = yield data.expression;
|
|
3833
|
+
if (res)
|
|
3834
|
+
return res;
|
|
3835
|
+
}
|
|
3836
|
+
if (data.thisArg) {
|
|
3837
|
+
const res = yield data.thisArg;
|
|
3838
|
+
if (res)
|
|
3839
|
+
return res;
|
|
3840
|
+
}
|
|
3841
|
+
},
|
|
3842
|
+
[SyntaxKind.JSDocTypeLiteral]: function* (data) {
|
|
3843
|
+
if (data.jsdocPropertyTags) {
|
|
3844
|
+
for (const n of data.jsdocPropertyTags) {
|
|
3845
|
+
const res = yield n;
|
|
3846
|
+
if (res)
|
|
3847
|
+
return res;
|
|
3848
|
+
}
|
|
3849
|
+
}
|
|
3850
|
+
},
|
|
3851
|
+
[SyntaxKind.ForInStatement]: function* (data) {
|
|
3852
|
+
if (data.awaitModifier) {
|
|
3853
|
+
const res = yield data.awaitModifier;
|
|
3854
|
+
if (res)
|
|
3855
|
+
return res;
|
|
3856
|
+
}
|
|
3857
|
+
if (data.initializer) {
|
|
3858
|
+
const res = yield data.initializer;
|
|
3859
|
+
if (res)
|
|
3860
|
+
return res;
|
|
3861
|
+
}
|
|
3862
|
+
if (data.expression) {
|
|
3863
|
+
const res = yield data.expression;
|
|
3864
|
+
if (res)
|
|
3865
|
+
return res;
|
|
3866
|
+
}
|
|
3867
|
+
if (data.statement) {
|
|
3868
|
+
const res = yield data.statement;
|
|
3869
|
+
if (res)
|
|
3870
|
+
return res;
|
|
3871
|
+
}
|
|
3872
|
+
},
|
|
3873
|
+
[SyntaxKind.ForOfStatement]: function* (data) {
|
|
3874
|
+
if (data.awaitModifier) {
|
|
3875
|
+
const res = yield data.awaitModifier;
|
|
3876
|
+
if (res)
|
|
3877
|
+
return res;
|
|
3878
|
+
}
|
|
3879
|
+
if (data.initializer) {
|
|
3880
|
+
const res = yield data.initializer;
|
|
3881
|
+
if (res)
|
|
3882
|
+
return res;
|
|
3883
|
+
}
|
|
3884
|
+
if (data.expression) {
|
|
3885
|
+
const res = yield data.expression;
|
|
3886
|
+
if (res)
|
|
3887
|
+
return res;
|
|
3888
|
+
}
|
|
3889
|
+
if (data.statement) {
|
|
3890
|
+
const res = yield data.statement;
|
|
3891
|
+
if (res)
|
|
3892
|
+
return res;
|
|
3893
|
+
}
|
|
3894
|
+
},
|
|
3895
|
+
[SyntaxKind.CaseClause]: function* (data) {
|
|
3896
|
+
if (data.expression) {
|
|
3897
|
+
const res = yield data.expression;
|
|
3898
|
+
if (res)
|
|
3899
|
+
return res;
|
|
3900
|
+
}
|
|
3901
|
+
for (const n of data.statements) {
|
|
3902
|
+
const res = yield n;
|
|
3903
|
+
if (res)
|
|
3904
|
+
return res;
|
|
3905
|
+
}
|
|
3906
|
+
},
|
|
3907
|
+
[SyntaxKind.DefaultClause]: function* (data) {
|
|
3908
|
+
if (data.expression) {
|
|
3909
|
+
const res = yield data.expression;
|
|
3910
|
+
if (res)
|
|
3911
|
+
return res;
|
|
3912
|
+
}
|
|
3913
|
+
for (const n of data.statements) {
|
|
3914
|
+
const res = yield n;
|
|
3915
|
+
if (res)
|
|
3916
|
+
return res;
|
|
3917
|
+
}
|
|
3918
|
+
},
|
|
3919
|
+
[SyntaxKind.ObjectBindingPattern]: function* (data) {
|
|
3920
|
+
for (const n of data.elements) {
|
|
3921
|
+
const res = yield n;
|
|
3922
|
+
if (res)
|
|
3923
|
+
return res;
|
|
3924
|
+
}
|
|
3925
|
+
},
|
|
3926
|
+
[SyntaxKind.ArrayBindingPattern]: function* (data) {
|
|
3927
|
+
for (const n of data.elements) {
|
|
3928
|
+
const res = yield n;
|
|
3929
|
+
if (res)
|
|
3930
|
+
return res;
|
|
3931
|
+
}
|
|
3932
|
+
},
|
|
3933
|
+
[SyntaxKind.JSDocParameterTag]: yieldEachChildOfJSDocParameterTag,
|
|
3934
|
+
[SyntaxKind.JSDocPropertyTag]: yieldEachChildOfJSDocPropertyTag,
|
|
3935
|
+
[SyntaxKind.SourceFile]: function* (data) {
|
|
3936
|
+
for (const n of data.statements) {
|
|
3937
|
+
const res = yield n;
|
|
3938
|
+
if (res)
|
|
3939
|
+
return res;
|
|
3940
|
+
}
|
|
3941
|
+
const res = yield data.endOfFileToken;
|
|
3942
|
+
if (res)
|
|
3943
|
+
return res;
|
|
3944
|
+
},
|
|
3945
|
+
};
|
|
1231
3946
|
function visitNode(cbNode, node) {
|
|
1232
3947
|
return node ? cbNode(node) : undefined;
|
|
1233
3948
|
}
|
|
@@ -2346,11 +5061,12 @@ export function createJSDocNameReference(name) {
|
|
|
2346
5061
|
name,
|
|
2347
5062
|
});
|
|
2348
5063
|
}
|
|
2349
|
-
export function createModuleDeclaration(modifiers, keyword, name, body) {
|
|
5064
|
+
export function createModuleDeclaration(modifiers, keyword, name, attributes, body) {
|
|
2350
5065
|
return new NodeObject(SyntaxKind.ModuleDeclaration, {
|
|
2351
5066
|
modifiers: modifiers ? createNodeArray(modifiers) : undefined,
|
|
2352
5067
|
keyword,
|
|
2353
5068
|
name,
|
|
5069
|
+
attributes,
|
|
2354
5070
|
body,
|
|
2355
5071
|
});
|
|
2356
5072
|
}
|
|
@@ -2946,8 +5662,8 @@ export function updateJSDocSignature(node, typeParameters, parameters, type) {
|
|
|
2946
5662
|
export function updateJSDocNameReference(node, name) {
|
|
2947
5663
|
return node.name !== name ? createJSDocNameReference(name) : node;
|
|
2948
5664
|
}
|
|
2949
|
-
export function updateModuleDeclaration(node, modifiers, name, body) {
|
|
2950
|
-
return node.modifiers !== modifiers || node.name !== name || node.body !== body ? createModuleDeclaration(modifiers, node.keyword, name, body) : node;
|
|
5665
|
+
export function updateModuleDeclaration(node, modifiers, name, attributes, body) {
|
|
5666
|
+
return node.modifiers !== modifiers || node.name !== name || node.attributes !== attributes || node.body !== body ? createModuleDeclaration(modifiers, node.keyword, name, attributes, body) : node;
|
|
2951
5667
|
}
|
|
2952
5668
|
export function updateImportEqualsDeclaration(node, modifiers, name, moduleReference) {
|
|
2953
5669
|
return node.modifiers !== modifiers || node.name !== name || node.moduleReference !== moduleReference ? createImportEqualsDeclaration(modifiers, node.isTypeOnly, name, moduleReference) : node;
|
|
@@ -3011,13 +5727,25 @@ export function createSourceFile(statements, endOfFileToken, text, fileName, pat
|
|
|
3011
5727
|
statements: createNodeArray(statements),
|
|
3012
5728
|
endOfFileToken,
|
|
3013
5729
|
text,
|
|
5730
|
+
originalText: text,
|
|
5731
|
+
spanMap: undefined,
|
|
5732
|
+
contentMapper: undefined,
|
|
5733
|
+
virtualFileName: undefined,
|
|
5734
|
+
diagnosticDirectives: undefined,
|
|
3014
5735
|
fileName,
|
|
3015
5736
|
path,
|
|
3016
5737
|
});
|
|
3017
5738
|
}
|
|
5739
|
+
function cloneSourceFileWithChanges(source, statements, endOfFileToken) {
|
|
5740
|
+
return new NodeObject(SyntaxKind.SourceFile, {
|
|
5741
|
+
...cloneSourceFileData(source),
|
|
5742
|
+
statements: createNodeArray(statements),
|
|
5743
|
+
endOfFileToken,
|
|
5744
|
+
});
|
|
5745
|
+
}
|
|
3018
5746
|
export function updateSourceFile(node, statements, endOfFileToken) {
|
|
3019
5747
|
return node.statements !== statements || node.endOfFileToken !== endOfFileToken
|
|
3020
|
-
?
|
|
5748
|
+
? cloneSourceFileWithChanges(node, statements, endOfFileToken)
|
|
3021
5749
|
: node;
|
|
3022
5750
|
}
|
|
3023
5751
|
//# sourceMappingURL=factory.generated.js.map
|