@@ -4,25 +4,23 @@ import type { Node, CallExpression } from "./generated/types.d.ts";
44
55// Empty visitor object is allowed
66const emptyVisitor = { } ;
7- export type _Empty = ExpectTrue < ExpectExtends < VisitorObject , typeof emptyVisitor > > ;
7+ type _Empty = ExpectTrue < ExpectExtends < VisitorObject , typeof emptyVisitor > > ;
88
99// Specific node visitors have a stricter type for the parameter
1010const callExpressionVisitor = {
1111 CallExpression : ( _node : CallExpression ) => { } ,
1212} ;
13- export type _CallExpr = ExpectTrue < ExpectExtends < VisitorObject , typeof callExpressionVisitor > > ;
13+ type _CallExpr = ExpectTrue < ExpectExtends < VisitorObject , typeof callExpressionVisitor > > ;
1414
1515const callExpressionExitVisitor = {
1616 "CallExpression:exit" : ( _node : CallExpression ) => { } ,
1717} ;
18- export type _CallExprExit = ExpectTrue <
19- ExpectExtends < VisitorObject , typeof callExpressionExitVisitor >
20- > ;
18+ type _CallExprExit = ExpectTrue < ExpectExtends < VisitorObject , typeof callExpressionExitVisitor > > ;
2119
2220const debuggerStatementWrongTypeVisitor = {
2321 DebuggerStatement : ( _node : CallExpression ) => { } ,
2422} ;
25- export type _DebuggerStmtWrongType = ExpectFalse <
23+ type _DebuggerStmtWrongType = ExpectFalse <
2624 ExpectExtends < VisitorObject , typeof debuggerStatementWrongTypeVisitor >
2725> ;
2826
@@ -31,13 +29,13 @@ const selectorsVisitor = {
3129 "FunctionExpression > Identifier" : ( _node : Node ) => { } ,
3230 ":matches(FunctionExpression, FunctionDeclaration)" : ( _node : Node ) => { } ,
3331} ;
34- export type _Selectors = ExpectTrue < ExpectExtends < VisitorObject , typeof selectorsVisitor > > ;
32+ type _Selectors = ExpectTrue < ExpectExtends < VisitorObject , typeof selectorsVisitor > > ;
3533
3634// Visitor functions can omit the node parameter
3735const callExpressionNoParamVisitor = {
3836 CallExpression : ( ) => { } ,
3937} ;
40- export type _CallExprNoParam = ExpectTrue <
38+ type _CallExprNoParam = ExpectTrue <
4139 ExpectExtends < VisitorObject , typeof callExpressionNoParamVisitor >
4240> ;
4341
@@ -47,22 +45,22 @@ export type _CallExprNoParam = ExpectTrue<
4745const callExpressionUndefinedVisitor = {
4846 CallExpression : undefined ,
4947} ;
50- export type _CallExprUndefined = ExpectTrue <
48+ type _CallExprUndefined = ExpectTrue <
5149 ExpectExtends < VisitorObject , typeof callExpressionUndefinedVisitor >
5250> ;
5351
5452// Other types are not allowed
5553const invalidNullVisitor = {
5654 CallExpression : null ,
5755} ;
58- export type _InvalidNull = ExpectFalse < ExpectExtends < VisitorObject , typeof invalidNullVisitor > > ;
56+ type _InvalidNull = ExpectFalse < ExpectExtends < VisitorObject , typeof invalidNullVisitor > > ;
5957
6058const invalidObjectVisitor = {
6159 CallExpression : { } ,
6260} ;
63- export type _InvalidObject = ExpectFalse < ExpectExtends < VisitorObject , typeof invalidObjectVisitor > > ;
61+ type _InvalidObject = ExpectFalse < ExpectExtends < VisitorObject , typeof invalidObjectVisitor > > ;
6462
6563const invalidStringVisitor = {
6664 CallExpression : "oh dear" ,
6765} ;
68- export type _InvalidString = ExpectFalse < ExpectExtends < VisitorObject , typeof invalidStringVisitor > > ;
66+ type _InvalidString = ExpectFalse < ExpectExtends < VisitorObject , typeof invalidStringVisitor > > ;
0 commit comments