@elench/testkit 0.1.63 → 0.1.65
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/lib/coverage/backend-discovery.mjs +6 -30
- package/lib/coverage/evidence.mjs +15 -3
- package/lib/coverage/evidence.test.mjs +13 -4
- package/lib/coverage/fs-walk.mjs +2 -2
- package/lib/coverage/graph-builder.mjs +23 -24
- package/lib/coverage/next-ir-to-graph.mjs +240 -0
- package/node_modules/@elench/next-analysis/package.json +14 -0
- package/node_modules/@elench/next-analysis/src/api-routes.mjs +81 -0
- package/node_modules/@elench/next-analysis/src/api-routes.test.mjs +22 -0
- package/node_modules/@elench/next-analysis/src/app-root.mjs +7 -0
- package/node_modules/@elench/next-analysis/src/backend-links.mjs +31 -0
- package/node_modules/@elench/next-analysis/src/index.mjs +21 -0
- package/node_modules/@elench/next-analysis/src/pages.mjs +68 -0
- package/node_modules/@elench/next-analysis/src/project.mjs +94 -0
- package/node_modules/@elench/next-analysis/src/project.test.mjs +35 -0
- package/node_modules/@elench/next-analysis/src/route-tree.mjs +621 -0
- package/node_modules/@elench/next-analysis/src/routes.mjs +41 -0
- package/node_modules/@elench/next-analysis/src/routes.test.mjs +25 -0
- package/node_modules/@elench/next-analysis/src/server-actions.mjs +53 -0
- package/node_modules/@elench/next-analysis/src/server-actions.test.mjs +37 -0
- package/node_modules/@elench/next-analysis/src/shared.mjs +209 -0
- package/node_modules/@elench/next-analysis/src/swc.mjs +388 -0
- package/node_modules/@elench/testkit-bridge/package.json +2 -2
- package/node_modules/@elench/testkit-protocol/package.json +1 -1
- package/node_modules/@elench/ts-analysis/package.json +10 -0
- package/node_modules/@elench/ts-analysis/src/callables.mjs +135 -0
- package/node_modules/@elench/ts-analysis/src/callables.test.mjs +55 -0
- package/node_modules/@elench/ts-analysis/src/exports.mjs +69 -0
- package/node_modules/@elench/ts-analysis/src/exports.test.mjs +50 -0
- package/node_modules/@elench/ts-analysis/src/index.mjs +14 -0
- package/node_modules/@elench/ts-analysis/src/jsx.mjs +69 -0
- package/node_modules/@elench/ts-analysis/src/jsx.test.mjs +43 -0
- package/node_modules/@elench/ts-analysis/src/project.mjs +100 -0
- package/node_modules/@elench/ts-analysis/src/project.test.mjs +54 -0
- package/node_modules/@elench/ts-analysis/src/requests.mjs +141 -0
- package/node_modules/@elench/ts-analysis/src/requests.test.mjs +35 -0
- package/node_modules/@elench/ts-analysis/src/resolution.mjs +53 -0
- package/node_modules/@elench/ts-analysis/src/shared.mjs +32 -0
- package/node_modules/@elench/ts-analysis/src/syntax.mjs +27 -0
- package/node_modules/@next/routing/README.md +91 -0
- package/node_modules/@next/routing/dist/__tests__/captures.test.d.ts +1 -0
- package/node_modules/@next/routing/dist/__tests__/conditions.test.d.ts +1 -0
- package/node_modules/@next/routing/dist/__tests__/dynamic-after-rewrites.test.d.ts +1 -0
- package/node_modules/@next/routing/dist/__tests__/i18n-resolve-routes.test.d.ts +1 -0
- package/node_modules/@next/routing/dist/__tests__/i18n.test.d.ts +1 -0
- package/node_modules/@next/routing/dist/__tests__/middleware.test.d.ts +1 -0
- package/node_modules/@next/routing/dist/__tests__/normalize-next-data.test.d.ts +1 -0
- package/node_modules/@next/routing/dist/__tests__/redirects.test.d.ts +1 -0
- package/node_modules/@next/routing/dist/__tests__/resolve-routes.test.d.ts +1 -0
- package/node_modules/@next/routing/dist/__tests__/rewrites.test.d.ts +1 -0
- package/node_modules/@next/routing/dist/destination.d.ts +22 -0
- package/node_modules/@next/routing/dist/i18n.d.ts +48 -0
- package/node_modules/@next/routing/dist/index.d.ts +5 -0
- package/node_modules/@next/routing/dist/index.js +1 -0
- package/node_modules/@next/routing/dist/matchers.d.ts +12 -0
- package/node_modules/@next/routing/dist/middleware.d.ts +12 -0
- package/node_modules/@next/routing/dist/next-data.d.ts +10 -0
- package/node_modules/@next/routing/dist/resolve-routes.d.ts +2 -0
- package/node_modules/@next/routing/dist/types.d.ts +97 -0
- package/node_modules/@next/routing/package.json +39 -0
- package/node_modules/@swc/core/README.md +100 -0
- package/node_modules/@swc/core/Visitor.d.ts +218 -0
- package/node_modules/@swc/core/Visitor.js +1399 -0
- package/node_modules/@swc/core/binding.d.ts +59 -0
- package/node_modules/@swc/core/binding.js +368 -0
- package/node_modules/@swc/core/index.d.ts +120 -0
- package/node_modules/@swc/core/index.js +443 -0
- package/node_modules/@swc/core/package.json +120 -0
- package/node_modules/@swc/core/postinstall.js +148 -0
- package/node_modules/@swc/core/spack.d.ts +51 -0
- package/node_modules/@swc/core/spack.js +87 -0
- package/node_modules/@swc/core/util.d.ts +1 -0
- package/node_modules/@swc/core/util.js +104 -0
- package/node_modules/@swc/core-linux-x64-gnu/README.md +3 -0
- package/node_modules/@swc/core-linux-x64-gnu/package.json +46 -0
- package/node_modules/@swc/core-linux-x64-gnu/swc.linux-x64-gnu.node +0 -0
- package/node_modules/@swc/counter/CHANGELOG.md +7 -0
- package/node_modules/@swc/counter/README.md +7 -0
- package/node_modules/@swc/counter/index.js +1 -0
- package/node_modules/@swc/counter/package.json +27 -0
- package/node_modules/@swc/types/LICENSE +201 -0
- package/node_modules/@swc/types/README.md +4 -0
- package/node_modules/@swc/types/assumptions.d.ts +92 -0
- package/node_modules/@swc/types/assumptions.js +2 -0
- package/node_modules/@swc/types/index.d.ts +2049 -0
- package/node_modules/@swc/types/index.js +2 -0
- package/node_modules/@swc/types/package.json +40 -0
- package/package.json +7 -3
- package/lib/coverage/next-discovery.mjs +0 -205
- package/lib/coverage/next-static-analysis.mjs +0 -1047
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
export type RouteHas = {
|
|
2
|
+
type: 'header' | 'cookie' | 'query';
|
|
3
|
+
key: string;
|
|
4
|
+
value?: string;
|
|
5
|
+
} | {
|
|
6
|
+
type: 'host';
|
|
7
|
+
key?: undefined;
|
|
8
|
+
value: string;
|
|
9
|
+
};
|
|
10
|
+
export type Route = {
|
|
11
|
+
sourceRegex: string;
|
|
12
|
+
destination?: string;
|
|
13
|
+
headers?: Record<string, string>;
|
|
14
|
+
has?: RouteHas[];
|
|
15
|
+
missing?: RouteHas[];
|
|
16
|
+
status?: number;
|
|
17
|
+
};
|
|
18
|
+
export type MiddlewareContext = {
|
|
19
|
+
url: URL;
|
|
20
|
+
headers: Headers;
|
|
21
|
+
requestBody: ReadableStream;
|
|
22
|
+
};
|
|
23
|
+
export type MiddlewareResult = {
|
|
24
|
+
bodySent?: boolean;
|
|
25
|
+
requestHeaders?: Headers;
|
|
26
|
+
responseHeaders?: Headers;
|
|
27
|
+
redirect?: {
|
|
28
|
+
url: URL;
|
|
29
|
+
status: number;
|
|
30
|
+
};
|
|
31
|
+
rewrite?: URL;
|
|
32
|
+
};
|
|
33
|
+
export type ResolveRoutesParams = {
|
|
34
|
+
url: URL;
|
|
35
|
+
buildId: string;
|
|
36
|
+
basePath: string;
|
|
37
|
+
requestBody: ReadableStream;
|
|
38
|
+
headers: Headers;
|
|
39
|
+
pathnames: string[];
|
|
40
|
+
i18n?: {
|
|
41
|
+
defaultLocale: string;
|
|
42
|
+
domains?: Array<{
|
|
43
|
+
defaultLocale: string;
|
|
44
|
+
domain: string;
|
|
45
|
+
http?: true;
|
|
46
|
+
locales?: string[];
|
|
47
|
+
}>;
|
|
48
|
+
localeDetection?: false;
|
|
49
|
+
locales: string[];
|
|
50
|
+
};
|
|
51
|
+
routes: {
|
|
52
|
+
beforeMiddleware: Array<Route>;
|
|
53
|
+
beforeFiles: Array<Route>;
|
|
54
|
+
afterFiles: Array<Route>;
|
|
55
|
+
dynamicRoutes: Array<Route>;
|
|
56
|
+
onMatch: Array<Route>;
|
|
57
|
+
fallback: Array<Route>;
|
|
58
|
+
shouldNormalizeNextData?: boolean;
|
|
59
|
+
};
|
|
60
|
+
invokeMiddleware: (ctx: MiddlewareContext) => Promise<MiddlewareResult>;
|
|
61
|
+
};
|
|
62
|
+
export type ResolveRoutesQueryValue = string | string[];
|
|
63
|
+
export type ResolveRoutesQuery = Record<string, ResolveRoutesQueryValue>;
|
|
64
|
+
export type RouteInvocationTarget = {
|
|
65
|
+
/**
|
|
66
|
+
* Concrete pathname that should be invoked after routing resolution.
|
|
67
|
+
*/
|
|
68
|
+
pathname: string;
|
|
69
|
+
/**
|
|
70
|
+
* Concrete query that should be invoked after routing resolution.
|
|
71
|
+
*/
|
|
72
|
+
query: ResolveRoutesQuery;
|
|
73
|
+
};
|
|
74
|
+
export type ResolveRoutesResult = {
|
|
75
|
+
middlewareResponded?: boolean;
|
|
76
|
+
externalRewrite?: URL;
|
|
77
|
+
redirect?: {
|
|
78
|
+
url: URL;
|
|
79
|
+
status: number;
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* Resolved pathname selected by route matching. For dynamic routes this is
|
|
83
|
+
* the matched template pathname.
|
|
84
|
+
*/
|
|
85
|
+
resolvedPathname?: string;
|
|
86
|
+
/**
|
|
87
|
+
* Merged query produced by rewrite/middleware routing.
|
|
88
|
+
*/
|
|
89
|
+
resolvedQuery?: ResolveRoutesQuery;
|
|
90
|
+
/**
|
|
91
|
+
* Concrete invocation target to use when invoking the resolved route/module.
|
|
92
|
+
*/
|
|
93
|
+
invocationTarget?: RouteInvocationTarget;
|
|
94
|
+
resolvedHeaders?: Headers;
|
|
95
|
+
status?: number;
|
|
96
|
+
routeMatches?: Record<string, string>;
|
|
97
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@next/routing",
|
|
3
|
+
"version": "16.2.4",
|
|
4
|
+
"keywords": [
|
|
5
|
+
"react",
|
|
6
|
+
"next",
|
|
7
|
+
"next.js",
|
|
8
|
+
"routing"
|
|
9
|
+
],
|
|
10
|
+
"description": "Next.js shared route resolving",
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "https://github.com/vercel/next.js",
|
|
14
|
+
"directory": "packages/next-routing"
|
|
15
|
+
},
|
|
16
|
+
"author": "Next.js Team <support@vercel.com>",
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"main": "dist/index.js",
|
|
19
|
+
"types": "dist/index.d.ts",
|
|
20
|
+
"files": [
|
|
21
|
+
"dist"
|
|
22
|
+
],
|
|
23
|
+
"scripts": {
|
|
24
|
+
"dev": "ncc build ./src/index.ts -w -o dist/",
|
|
25
|
+
"prerelease": "node ../../scripts/rm.mjs dist",
|
|
26
|
+
"types": "tsc --declaration --emitDeclarationOnly --declarationDir dist",
|
|
27
|
+
"release": "ncc build ./src/index.ts -o ./dist/ --minify --no-cache --no-source-map-register",
|
|
28
|
+
"build": "pnpm release && pnpm types",
|
|
29
|
+
"test": "jest",
|
|
30
|
+
"test:watch": "jest --watch",
|
|
31
|
+
"prepublishOnly": "cd ../../ && turbo run build"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@types/jest": "^29.5.0",
|
|
35
|
+
"@vercel/ncc": "0.34.0",
|
|
36
|
+
"jest": "^29.5.0",
|
|
37
|
+
"ts-jest": "^29.1.0"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://swc.rs/">
|
|
3
|
+
<img alt="swc" src="https://raw.githubusercontent.com/swc-project/logo/master/swc.png" width="546">
|
|
4
|
+
</a>
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
Make the web (development) faster.
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<a href="https://www.npmjs.com/package/@swc/core"><img alt="downloads (@swc/core)" src="https://img.shields.io/npm/dm/@swc/core?label=downloads%20%28%40swc%2Fcore%29"></a>
|
|
13
|
+
<a href="https://www.npmjs.com/package/@swc/counter?activeTab=dependents"><img alt="downloads (3rd party)" src="https://img.shields.io/npm/dm/@swc/counter?label=downloads%20%283rd%20party%29"></a>
|
|
14
|
+
</p>
|
|
15
|
+
<p align="center">
|
|
16
|
+
<a href="https://crates.io/crates/swc_ecma_parser"><img alt="undefined" src="https://img.shields.io/crates/d/swc_ecma_parser.svg?label=crates.io%20downloads"></a>
|
|
17
|
+
<a href="https://github.com/swc-project/swc/releases/latest"><img alt="GitHub release (latest SemVer)" src="https://img.shields.io/github/v/release/swc-project/swc"></a>
|
|
18
|
+
</p>
|
|
19
|
+
<p align="center">
|
|
20
|
+
<img alt="GitHub code size in bytes" src="https://img.shields.io/github/languages/code-size/swc-project/swc">
|
|
21
|
+
<a href="https://github.com/swc-project/swc/blob/main/package.json#L22"><img alt="node-current (scoped)" src="https://img.shields.io/node/v/@swc/core"></a>
|
|
22
|
+
</p>
|
|
23
|
+
<p align="center">
|
|
24
|
+
<a href="https://discord.com/invite/GnHbXTdZz6"><img alt="Discord" src="https://img.shields.io/discord/889779439272075314"></a>
|
|
25
|
+
</p>
|
|
26
|
+
|
|
27
|
+
SWC (stands for `Speedy Web Compiler`) is a super-fast TypeScript / JavaScript compiler written in Rust. It's a library for Rust and JavaScript at the same time. If you are using SWC from Rust, see [rustdoc](https://rustdoc.swc.rs/swc/) and for most users, your entry point for using the library will be [parser](https://rustdoc.swc.rs/swc_ecma_parser/).
|
|
28
|
+
|
|
29
|
+
Also, SWC tries to ensure that
|
|
30
|
+
|
|
31
|
+
> If you select the latest version of each crates, it will work
|
|
32
|
+
|
|
33
|
+
for rust users.
|
|
34
|
+
|
|
35
|
+
MSRV of crates is currently `1.73`.
|
|
36
|
+
|
|
37
|
+
To update all SWC crates you use, you can run `curl https://raw.githubusercontent.com/swc-project/swc/main/scripts/update-all-swc-crates.sh | bash -s`. This script will update all dependencies to the latest version and run `cargo build` to ensure that everything works.
|
|
38
|
+
Note that you need
|
|
39
|
+
|
|
40
|
+
- `jq`
|
|
41
|
+
- `cargo upgrade`
|
|
42
|
+
|
|
43
|
+
command to run the script.
|
|
44
|
+
|
|
45
|
+
Supported Node Versions:
|
|
46
|
+
|
|
47
|
+
- Node v10+ for usage
|
|
48
|
+
- Node v20+ for development
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
If you are using SWC from JavaScript, please refer to [docs on the website](https://swc.rs/docs/installation/).
|
|
53
|
+
|
|
54
|
+
# Documentation
|
|
55
|
+
|
|
56
|
+
Check out the documentation [in the website](https://swc.rs/docs/installation/).
|
|
57
|
+
|
|
58
|
+
# Features
|
|
59
|
+
|
|
60
|
+
Please see [comparison with babel](https://swc.rs/docs/migrating-from-babel).
|
|
61
|
+
|
|
62
|
+
# Performance
|
|
63
|
+
|
|
64
|
+
Please see [benchmark results](https://swc.rs/docs/benchmark-transform) on the website.
|
|
65
|
+
|
|
66
|
+
# Supporting development
|
|
67
|
+
|
|
68
|
+
<h2 align="center">Supporting swc</h2>
|
|
69
|
+
|
|
70
|
+
## Star History
|
|
71
|
+
|
|
72
|
+
[](https://www.star-history.com/#swc-project/swc&Timeline)
|
|
73
|
+
|
|
74
|
+
## Powered by
|
|
75
|
+
|
|
76
|
+
[](https://jb.gg/OpenSourceSupport)
|
|
77
|
+
|
|
78
|
+
## Sponsors
|
|
79
|
+
|
|
80
|
+
<p align="center">
|
|
81
|
+
<a href="https://opencollective.com/swc">
|
|
82
|
+
<img src="https://raw.githubusercontent.com/swc-project/swc-sponsor-images/main/sponsors.svg" alt="Sponsors">
|
|
83
|
+
</a>
|
|
84
|
+
</p>
|
|
85
|
+
|
|
86
|
+
SWC is a community-driven project, and is maintained by a group of [volunteers](https://swc.rs/docs/team). If you'd like to help support the future of the project, please consider:
|
|
87
|
+
|
|
88
|
+
- Giving developer time on the project. (Message us on [Discord](https://discord.gg/GnHbXTdZz6) (preferred) or [Github discussions](https://github.com/swc-project/swc/discussions) for guidance!)
|
|
89
|
+
- Giving funds by becoming a sponsor (see https://opencollective.com/swc)!
|
|
90
|
+
|
|
91
|
+
## Contributing
|
|
92
|
+
|
|
93
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md). You may also find the architecture
|
|
94
|
+
documentation useful ([ARCHITECTURE.md](ARCHITECTURE.md)).
|
|
95
|
+
|
|
96
|
+
## License
|
|
97
|
+
|
|
98
|
+
SWC is primarily distributed under the terms of the Apache License (Version 2.0).
|
|
99
|
+
|
|
100
|
+
See [LICENSE](LICENSE) for details.
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import { Accessibility, Argument, ArrayExpression, ArrayPattern, ArrowFunctionExpression, AssignmentExpression, AssignmentPattern, AssignmentPatternProperty, AssignmentProperty, AwaitExpression, BigIntLiteral, BinaryExpression, BindingIdentifier, BlockStatement, BooleanLiteral, BreakStatement, CallExpression, CatchClause, Class, ClassDeclaration, ClassExpression, ClassMember, ClassMethod, ClassProperty, ComputedPropName, ConditionalExpression, Constructor, ContinueStatement, DebuggerStatement, Declaration, Decorator, DefaultDecl, DoWhileStatement, EmptyStatement, ExportAllDeclaration, ExportDeclaration, ExportDefaultDeclaration, ExportDefaultExpression, ExportDefaultSpecifier, ExportNamedDeclaration, ExportNamespaceSpecifier, ExportSpecifier, ExprOrSpread, Expression, ExpressionStatement, Fn, ForInStatement, ForOfStatement, ForStatement, FunctionDeclaration, FunctionExpression, GetterProperty, Identifier, IfStatement, Import, ImportDeclaration, ImportDefaultSpecifier, ImportNamespaceSpecifier, ImportSpecifier, JSXAttrValue, JSXAttribute, JSXAttributeName, JSXAttributeOrSpread, JSXClosingElement, JSXClosingFragment, JSXElement, JSXElementChild, JSXElementName, JSXEmptyExpression, JSXExpressionContainer, JSXFragment, JSXMemberExpression, JSXNamespacedName, JSXObject, JSXOpeningElement, JSXOpeningFragment, JSXSpreadChild, JSXText, KeyValuePatternProperty, KeyValueProperty, LabeledStatement, MemberExpression, MetaProperty, MethodProperty, Module, ModuleDeclaration, ModuleExportName, ModuleItem, NamedExportSpecifier, NamedImportSpecifier, NewExpression, NullLiteral, NumericLiteral, ObjectExpression, ObjectPattern, ObjectPatternProperty, OptionalChainingCall, OptionalChainingExpression, Param, ParenthesisExpression, Pattern, PrivateMethod, PrivateName, PrivateProperty, Program, Property, PropertyName, RegExpLiteral, RestElement, ReturnStatement, Script, SequenceExpression, SetterProperty, SpreadElement, Statement, StaticBlock, StringLiteral, Super, SuperPropExpression, SwitchCase, SwitchStatement, TaggedTemplateExpression, TemplateLiteral, ThisExpression, ThrowStatement, TryStatement, TsAsExpression, TsCallSignatureDeclaration, TsConstAssertion, TsConstructSignatureDeclaration, TsEntityName, TsEnumDeclaration, TsEnumMember, TsEnumMemberId, TsExportAssignment, TsExpressionWithTypeArguments, TsExternalModuleReference, TsFnParameter, TsGetterSignature, TsImportEqualsDeclaration, TsIndexSignature, TsInstantiation, TsInterfaceBody, TsInterfaceDeclaration, TsMethodSignature, TsModuleBlock, TsModuleDeclaration, TsModuleName, TsModuleReference, TsNamespaceBody, TsNamespaceDeclaration, TsNamespaceExportDeclaration, TsNonNullExpression, TsParameterProperty, TsParameterPropertyParameter, TsPropertySignature, TsQualifiedName, TsSatisfiesExpression, TsSetterSignature, TsType, TsTypeAliasDeclaration, TsTypeAnnotation, TsTypeAssertion, TsTypeElement, TsTypeParameter, TsTypeParameterDeclaration, TsTypeParameterInstantiation, UnaryExpression, UpdateExpression, VariableDeclaration, VariableDeclarator, WhileStatement, WithStatement, YieldExpression } from "@swc/types";
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated JavaScript API is deprecated. Please use Wasm plugin instead.
|
|
4
|
+
*/
|
|
5
|
+
export declare class Visitor {
|
|
6
|
+
visitProgram(n: Program): Program;
|
|
7
|
+
visitModule(m: Module): Module;
|
|
8
|
+
visitScript(m: Script): Script;
|
|
9
|
+
visitModuleItems(items: ModuleItem[]): ModuleItem[];
|
|
10
|
+
visitModuleItem(n: ModuleItem): ModuleItem;
|
|
11
|
+
visitModuleDeclaration(n: ModuleDeclaration): ModuleDeclaration;
|
|
12
|
+
visitTsNamespaceExportDeclaration(n: TsNamespaceExportDeclaration): ModuleDeclaration;
|
|
13
|
+
visitTsExportAssignment(n: TsExportAssignment): TsExportAssignment;
|
|
14
|
+
visitTsImportEqualsDeclaration(n: TsImportEqualsDeclaration): ModuleDeclaration;
|
|
15
|
+
visitTsModuleReference(n: TsModuleReference): TsModuleReference;
|
|
16
|
+
visitTsExternalModuleReference(n: TsExternalModuleReference): TsExternalModuleReference;
|
|
17
|
+
visitExportAllDeclaration(n: ExportAllDeclaration): ModuleDeclaration;
|
|
18
|
+
visitExportDefaultExpression(n: ExportDefaultExpression): ModuleDeclaration;
|
|
19
|
+
visitExportNamedDeclaration(n: ExportNamedDeclaration): ModuleDeclaration;
|
|
20
|
+
visitExportSpecifiers(nodes: ExportSpecifier[]): ExportSpecifier[];
|
|
21
|
+
visitExportSpecifier(n: ExportSpecifier): ExportSpecifier;
|
|
22
|
+
visitNamedExportSpecifier(n: NamedExportSpecifier): ExportSpecifier;
|
|
23
|
+
visitModuleExportName(n: ModuleExportName): ModuleExportName;
|
|
24
|
+
visitExportNamespaceSpecifier(n: ExportNamespaceSpecifier): ExportSpecifier;
|
|
25
|
+
visitExportDefaultSpecifier(n: ExportDefaultSpecifier): ExportSpecifier;
|
|
26
|
+
visitOptionalStringLiteral(n: StringLiteral | undefined): StringLiteral | undefined;
|
|
27
|
+
visitExportDefaultDeclaration(n: ExportDefaultDeclaration): ModuleDeclaration;
|
|
28
|
+
visitDefaultDeclaration(n: DefaultDecl): DefaultDecl;
|
|
29
|
+
visitFunctionExpression(n: FunctionExpression): FunctionExpression;
|
|
30
|
+
visitClassExpression(n: ClassExpression): ClassExpression;
|
|
31
|
+
visitExportDeclaration(n: ExportDeclaration): ModuleDeclaration;
|
|
32
|
+
visitArrayExpression(e: ArrayExpression): Expression;
|
|
33
|
+
visitArrayElement(e: ExprOrSpread | undefined): ExprOrSpread | undefined;
|
|
34
|
+
visitExprOrSpread(e: ExprOrSpread): ExprOrSpread;
|
|
35
|
+
visitExprOrSpreads(nodes: ExprOrSpread[]): ExprOrSpread[];
|
|
36
|
+
visitSpreadElement(e: SpreadElement): SpreadElement;
|
|
37
|
+
visitOptionalExpression(e: Expression | undefined): Expression | undefined;
|
|
38
|
+
visitArrowFunctionExpression(e: ArrowFunctionExpression): Expression;
|
|
39
|
+
visitArrowBody(body: BlockStatement | Expression): BlockStatement | Expression;
|
|
40
|
+
visitBlockStatement(block: BlockStatement): BlockStatement;
|
|
41
|
+
visitStatements(stmts: Statement[]): Statement[];
|
|
42
|
+
visitStatement(stmt: Statement): Statement;
|
|
43
|
+
visitSwitchStatement(stmt: SwitchStatement): Statement;
|
|
44
|
+
visitSwitchCases(cases: SwitchCase[]): SwitchCase[];
|
|
45
|
+
visitSwitchCase(c: SwitchCase): SwitchCase;
|
|
46
|
+
visitIfStatement(stmt: IfStatement): Statement;
|
|
47
|
+
visitOptionalStatement(stmt: Statement | undefined): Statement | undefined;
|
|
48
|
+
visitBreakStatement(stmt: BreakStatement): Statement;
|
|
49
|
+
visitWhileStatement(stmt: WhileStatement): Statement;
|
|
50
|
+
visitTryStatement(stmt: TryStatement): Statement;
|
|
51
|
+
visitCatchClause(handler: CatchClause | undefined): CatchClause | undefined;
|
|
52
|
+
visitThrowStatement(stmt: ThrowStatement): Statement;
|
|
53
|
+
visitReturnStatement(stmt: ReturnStatement): Statement;
|
|
54
|
+
visitLabeledStatement(stmt: LabeledStatement): Statement;
|
|
55
|
+
visitForStatement(stmt: ForStatement): Statement;
|
|
56
|
+
visitForOfStatement(stmt: ForOfStatement): Statement;
|
|
57
|
+
visitForInStatement(stmt: ForInStatement): Statement;
|
|
58
|
+
visitEmptyStatement(stmt: EmptyStatement): EmptyStatement;
|
|
59
|
+
visitDoWhileStatement(stmt: DoWhileStatement): Statement;
|
|
60
|
+
visitDebuggerStatement(stmt: DebuggerStatement): Statement;
|
|
61
|
+
visitWithStatement(stmt: WithStatement): Statement;
|
|
62
|
+
visitDeclaration(decl: Declaration): Declaration;
|
|
63
|
+
visitVariableDeclaration(n: VariableDeclaration): VariableDeclaration;
|
|
64
|
+
visitVariableDeclarators(nodes: VariableDeclarator[]): VariableDeclarator[];
|
|
65
|
+
visitVariableDeclarator(n: VariableDeclarator): VariableDeclarator;
|
|
66
|
+
visitTsTypeAliasDeclaration(n: TsTypeAliasDeclaration): Declaration;
|
|
67
|
+
visitTsModuleDeclaration(n: TsModuleDeclaration): Declaration;
|
|
68
|
+
visitTsModuleName(n: TsModuleName): TsModuleName;
|
|
69
|
+
visitTsNamespaceBody(n: TsNamespaceBody): TsNamespaceBody | undefined;
|
|
70
|
+
visitTsNamespaceDeclaration(n: TsNamespaceDeclaration): TsModuleBlock | TsNamespaceDeclaration;
|
|
71
|
+
visitTsModuleBlock(n: TsModuleBlock): TsModuleBlock | TsNamespaceDeclaration;
|
|
72
|
+
visitTsInterfaceDeclaration(n: TsInterfaceDeclaration): TsInterfaceDeclaration;
|
|
73
|
+
visitTsInterfaceBody(n: TsInterfaceBody): TsInterfaceBody;
|
|
74
|
+
visitTsTypeElements(nodes: TsTypeElement[]): TsTypeElement[];
|
|
75
|
+
visitTsTypeElement(n: TsTypeElement): TsTypeElement;
|
|
76
|
+
visitTsCallSignatureDeclaration(n: TsCallSignatureDeclaration): TsCallSignatureDeclaration;
|
|
77
|
+
visitTsConstructSignatureDeclaration(n: TsConstructSignatureDeclaration): TsConstructSignatureDeclaration;
|
|
78
|
+
visitTsPropertySignature(n: TsPropertySignature): TsPropertySignature;
|
|
79
|
+
visitTsGetterSignature(n: TsGetterSignature): TsGetterSignature;
|
|
80
|
+
visitTsSetterSignature(n: TsSetterSignature): TsSetterSignature;
|
|
81
|
+
visitTsMethodSignature(n: TsMethodSignature): TsMethodSignature;
|
|
82
|
+
visitTsEnumDeclaration(n: TsEnumDeclaration): Declaration;
|
|
83
|
+
visitTsEnumMembers(nodes: TsEnumMember[]): TsEnumMember[];
|
|
84
|
+
visitTsEnumMember(n: TsEnumMember): TsEnumMember;
|
|
85
|
+
visitTsEnumMemberId(n: TsEnumMemberId): TsEnumMemberId;
|
|
86
|
+
visitFunctionDeclaration(decl: FunctionDeclaration): Declaration;
|
|
87
|
+
visitClassDeclaration(decl: ClassDeclaration): Declaration;
|
|
88
|
+
visitClassBody(members: ClassMember[]): ClassMember[];
|
|
89
|
+
visitClassMember(member: ClassMember): ClassMember;
|
|
90
|
+
visitTsIndexSignature(n: TsIndexSignature): TsIndexSignature;
|
|
91
|
+
visitTsFnParameters(params: TsFnParameter[]): TsFnParameter[];
|
|
92
|
+
visitTsFnParameter(n: TsFnParameter): TsFnParameter;
|
|
93
|
+
visitPrivateProperty(n: PrivateProperty): ClassMember;
|
|
94
|
+
visitPrivateMethod(n: PrivateMethod): ClassMember;
|
|
95
|
+
visitPrivateName(n: PrivateName): PrivateName;
|
|
96
|
+
visitConstructor(n: Constructor): ClassMember;
|
|
97
|
+
visitConstructorParameters(nodes: (Param | TsParameterProperty)[]): (Param | TsParameterProperty)[];
|
|
98
|
+
visitConstructorParameter(n: Param | TsParameterProperty): Param | TsParameterProperty;
|
|
99
|
+
visitStaticBlock(n: StaticBlock): StaticBlock;
|
|
100
|
+
visitTsParameterProperty(n: TsParameterProperty): TsParameterProperty | Param;
|
|
101
|
+
visitTsParameterPropertyParameter(n: TsParameterPropertyParameter): TsParameterPropertyParameter;
|
|
102
|
+
visitPropertyName(key: PropertyName): PropertyName;
|
|
103
|
+
visitAccessibility(n: Accessibility | undefined): Accessibility | undefined;
|
|
104
|
+
visitClassProperty(n: ClassProperty): ClassMember;
|
|
105
|
+
visitClassMethod(n: ClassMethod): ClassMember;
|
|
106
|
+
visitComputedPropertyKey(n: ComputedPropName): ComputedPropName;
|
|
107
|
+
visitClass<T extends Class>(n: T): T;
|
|
108
|
+
visitFunction<T extends Fn>(n: T): T;
|
|
109
|
+
visitTsExpressionsWithTypeArguments(nodes: TsExpressionWithTypeArguments[]): TsExpressionWithTypeArguments[];
|
|
110
|
+
visitTsExpressionWithTypeArguments(n: TsExpressionWithTypeArguments): TsExpressionWithTypeArguments;
|
|
111
|
+
visitTsTypeParameterInstantiation(n: TsTypeParameterInstantiation | undefined): TsTypeParameterInstantiation | undefined;
|
|
112
|
+
visitTsTypes(nodes: TsType[]): TsType[];
|
|
113
|
+
visitTsEntityName(n: TsEntityName): TsEntityName;
|
|
114
|
+
visitTsQualifiedName(n: TsQualifiedName): TsQualifiedName;
|
|
115
|
+
visitDecorators(nodes: Decorator[] | undefined): Decorator[] | undefined;
|
|
116
|
+
visitDecorator(n: Decorator): Decorator;
|
|
117
|
+
visitExpressionStatement(stmt: ExpressionStatement): Statement;
|
|
118
|
+
visitContinueStatement(stmt: ContinueStatement): Statement;
|
|
119
|
+
visitExpression(n: Expression): Expression;
|
|
120
|
+
visitOptionalChainingExpression(n: OptionalChainingExpression): Expression;
|
|
121
|
+
visitMemberExpressionOrOptionalChainingCall(n: MemberExpression | OptionalChainingCall): MemberExpression | OptionalChainingCall;
|
|
122
|
+
visitOptionalChainingCall(n: OptionalChainingCall): OptionalChainingCall;
|
|
123
|
+
visitAssignmentExpression(n: AssignmentExpression): Expression;
|
|
124
|
+
visitPatternOrExpression(n: Pattern | Expression): Pattern | Expression;
|
|
125
|
+
visitYieldExpression(n: YieldExpression): Expression;
|
|
126
|
+
visitUpdateExpression(n: UpdateExpression): Expression;
|
|
127
|
+
visitUnaryExpression(n: UnaryExpression): Expression;
|
|
128
|
+
visitTsTypeAssertion(n: TsTypeAssertion): Expression;
|
|
129
|
+
visitTsConstAssertion(n: TsConstAssertion): Expression;
|
|
130
|
+
visitTsInstantiation(n: TsInstantiation): TsInstantiation;
|
|
131
|
+
visitTsNonNullExpression(n: TsNonNullExpression): Expression;
|
|
132
|
+
visitTsAsExpression(n: TsAsExpression): Expression;
|
|
133
|
+
visitTsSatisfiesExpression(n: TsSatisfiesExpression): Expression;
|
|
134
|
+
visitThisExpression(n: ThisExpression): Expression;
|
|
135
|
+
visitTemplateLiteral(n: TemplateLiteral): Expression;
|
|
136
|
+
visitParameters(n: Param[]): Param[];
|
|
137
|
+
visitParameter(n: Param): Param;
|
|
138
|
+
visitTaggedTemplateExpression(n: TaggedTemplateExpression): Expression;
|
|
139
|
+
visitSequenceExpression(n: SequenceExpression): Expression;
|
|
140
|
+
visitRegExpLiteral(n: RegExpLiteral): Expression;
|
|
141
|
+
visitParenthesisExpression(n: ParenthesisExpression): Expression;
|
|
142
|
+
visitObjectExpression(n: ObjectExpression): Expression;
|
|
143
|
+
visitObjectProperties(nodes: (Property | SpreadElement)[]): (Property | SpreadElement)[];
|
|
144
|
+
visitObjectProperty(n: Property | SpreadElement): Property | SpreadElement;
|
|
145
|
+
visitProperty(n: Property): Property | SpreadElement;
|
|
146
|
+
visitSetterProperty(n: SetterProperty): Property | SpreadElement;
|
|
147
|
+
visitMethodProperty(n: MethodProperty): Property | SpreadElement;
|
|
148
|
+
visitKeyValueProperty(n: KeyValueProperty): Property | SpreadElement;
|
|
149
|
+
visitGetterProperty(n: GetterProperty): Property | SpreadElement;
|
|
150
|
+
visitAssignmentProperty(n: AssignmentProperty): Property | SpreadElement;
|
|
151
|
+
visitNullLiteral(n: NullLiteral): NullLiteral;
|
|
152
|
+
visitNewExpression(n: NewExpression): Expression;
|
|
153
|
+
visitTsTypeArguments(n: TsTypeParameterInstantiation | undefined): TsTypeParameterInstantiation | undefined;
|
|
154
|
+
visitArguments(nodes: Argument[]): Argument[];
|
|
155
|
+
visitArgument(n: Argument): Argument;
|
|
156
|
+
visitMetaProperty(n: MetaProperty): Expression;
|
|
157
|
+
visitMemberExpression(n: MemberExpression): MemberExpression;
|
|
158
|
+
visitSuperPropExpression(n: SuperPropExpression): Expression;
|
|
159
|
+
visitCallee(n: Expression | Super | Import): Expression | Super | Import;
|
|
160
|
+
visitJSXText(n: JSXText): JSXText;
|
|
161
|
+
visitJSXNamespacedName(n: JSXNamespacedName): JSXNamespacedName;
|
|
162
|
+
visitJSXMemberExpression(n: JSXMemberExpression): JSXMemberExpression;
|
|
163
|
+
visitJSXObject(n: JSXObject): JSXObject;
|
|
164
|
+
visitJSXFragment(n: JSXFragment): JSXFragment;
|
|
165
|
+
visitJSXClosingFragment(n: JSXClosingFragment): JSXClosingFragment;
|
|
166
|
+
visitJSXElementChildren(nodes: JSXElementChild[]): JSXElementChild[];
|
|
167
|
+
visitJSXElementChild(n: JSXElementChild): JSXElementChild;
|
|
168
|
+
visitJSXExpressionContainer(n: JSXExpressionContainer): JSXExpressionContainer;
|
|
169
|
+
visitJSXSpreadChild(n: JSXSpreadChild): JSXElementChild;
|
|
170
|
+
visitJSXOpeningFragment(n: JSXOpeningFragment): JSXOpeningFragment;
|
|
171
|
+
visitJSXEmptyExpression(n: JSXEmptyExpression): Expression;
|
|
172
|
+
visitJSXElement(n: JSXElement): JSXElement;
|
|
173
|
+
visitJSXClosingElement(n: JSXClosingElement | undefined): JSXClosingElement | undefined;
|
|
174
|
+
visitJSXElementName(n: JSXElementName): JSXElementName;
|
|
175
|
+
visitJSXOpeningElement(n: JSXOpeningElement): JSXOpeningElement;
|
|
176
|
+
visitJSXAttributes(attrs: JSXAttributeOrSpread[] | undefined): JSXAttributeOrSpread[] | undefined;
|
|
177
|
+
visitJSXAttributeOrSpread(n: JSXAttributeOrSpread): JSXAttributeOrSpread;
|
|
178
|
+
visitJSXAttributeOrSpreads(nodes: JSXAttributeOrSpread[]): JSXAttributeOrSpread[];
|
|
179
|
+
visitJSXAttribute(n: JSXAttribute): JSXAttributeOrSpread;
|
|
180
|
+
visitJSXAttributeValue(n: JSXAttrValue | undefined): JSXAttrValue | undefined;
|
|
181
|
+
visitJSXAttributeName(n: JSXAttributeName): JSXAttributeName;
|
|
182
|
+
visitConditionalExpression(n: ConditionalExpression): Expression;
|
|
183
|
+
visitCallExpression(n: CallExpression): Expression;
|
|
184
|
+
visitBooleanLiteral(n: BooleanLiteral): BooleanLiteral;
|
|
185
|
+
visitBinaryExpression(n: BinaryExpression): Expression;
|
|
186
|
+
visitAwaitExpression(n: AwaitExpression): Expression;
|
|
187
|
+
visitTsTypeParameterDeclaration(n: TsTypeParameterDeclaration | undefined): TsTypeParameterDeclaration | undefined;
|
|
188
|
+
visitTsTypeParameters(nodes: TsTypeParameter[]): TsTypeParameter[];
|
|
189
|
+
visitTsTypeParameter(n: TsTypeParameter): TsTypeParameter;
|
|
190
|
+
visitTsTypeAnnotation(a: TsTypeAnnotation | undefined): TsTypeAnnotation | undefined;
|
|
191
|
+
visitTsType(n: TsType): TsType;
|
|
192
|
+
visitPatterns(nodes: Pattern[]): Pattern[];
|
|
193
|
+
visitImportDeclaration(n: ImportDeclaration): ImportDeclaration;
|
|
194
|
+
visitImportSpecifiers(nodes: ImportSpecifier[]): ImportSpecifier[];
|
|
195
|
+
visitImportSpecifier(node: ImportSpecifier): ImportSpecifier;
|
|
196
|
+
visitNamedImportSpecifier(node: NamedImportSpecifier): NamedImportSpecifier;
|
|
197
|
+
visitImportNamespaceSpecifier(node: ImportNamespaceSpecifier): ImportNamespaceSpecifier;
|
|
198
|
+
visitImportDefaultSpecifier(node: ImportDefaultSpecifier): ImportSpecifier;
|
|
199
|
+
visitBindingIdentifier(i: BindingIdentifier): BindingIdentifier;
|
|
200
|
+
visitIdentifierReference(i: Identifier): Identifier;
|
|
201
|
+
visitLabelIdentifier(label: Identifier): Identifier;
|
|
202
|
+
visitIdentifier(n: Identifier): Identifier;
|
|
203
|
+
visitStringLiteral(n: StringLiteral): StringLiteral;
|
|
204
|
+
visitNumericLiteral(n: NumericLiteral): NumericLiteral;
|
|
205
|
+
visitBigIntLiteral(n: BigIntLiteral): BigIntLiteral;
|
|
206
|
+
visitPattern(n: Pattern): Pattern;
|
|
207
|
+
visitRestElement(n: RestElement): RestElement;
|
|
208
|
+
visitAssignmentPattern(n: AssignmentPattern): Pattern;
|
|
209
|
+
visitObjectPattern(n: ObjectPattern): Pattern;
|
|
210
|
+
visitObjectPatternProperties(nodes: ObjectPatternProperty[]): ObjectPatternProperty[];
|
|
211
|
+
visitObjectPatternProperty(n: ObjectPatternProperty): ObjectPatternProperty;
|
|
212
|
+
visitKeyValuePatternProperty(n: KeyValuePatternProperty): ObjectPatternProperty;
|
|
213
|
+
visitAssignmentPatternProperty(n: AssignmentPatternProperty): ObjectPatternProperty;
|
|
214
|
+
visitArrayPattern(n: ArrayPattern): Pattern;
|
|
215
|
+
visitArrayPatternElements(nodes: (Pattern | undefined)[]): (Pattern | undefined)[];
|
|
216
|
+
visitArrayPatternElement(n: Pattern | undefined): Pattern | undefined;
|
|
217
|
+
}
|
|
218
|
+
export default Visitor;
|