File tree Expand file tree Collapse file tree 3 files changed +8
-2
lines changed
Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,6 @@ import {
4040 memberExpression ,
4141 numericLiteral ,
4242 toIdentifier ,
43- unaryExpression ,
4443 variableDeclaration ,
4544 variableDeclarator ,
4645 isRecordExpression ,
@@ -50,6 +49,7 @@ import {
5049 isMetaProperty ,
5150 isPrivateName ,
5251 isExportDeclaration ,
52+ buildUndefinedNode ,
5353} from "@babel/types" ;
5454import * as t from "@babel/types" ;
5555import { scope as scopeCache } from "../cache.ts" ;
@@ -783,7 +783,7 @@ export default class Scope {
783783 }
784784
785785 buildUndefinedNode ( ) {
786- return unaryExpression ( "void" , numericLiteral ( 0 ) , true ) ;
786+ return buildUndefinedNode ( ) ;
787787 }
788788
789789 registerConstantViolation ( path : NodePath ) {
Original file line number Diff line number Diff line change 1+ import { numericLiteral , unaryExpression } from "./generated/index.ts" ;
2+
3+ export function buildUndefinedNode ( ) {
4+ return unaryExpression ( "void" , numericLiteral ( 0 ) , true ) ;
5+ }
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ export { default as createFlowUnionType } from "./builders/flow/createFlowUnionT
1414export { default as createTSUnionType } from "./builders/typescript/createTSUnionType.ts" ;
1515export * from "./builders/generated/index.ts" ;
1616export * from "./builders/generated/uppercase.js" ;
17+ export * from "./builders/productions.ts" ;
1718
1819// clone
1920export { default as cloneNode } from "./clone/cloneNode.ts" ;
You can’t perform that action at this time.
0 commit comments