* task: AST based entity refactor * implemented refactor logic * jest cases with string manipulation using AST logic * comments and indentation * added evalVersion to request
52 lines
1.1 KiB
TypeScript
52 lines
1.1 KiB
TypeScript
import {
|
|
ObjectExpression,
|
|
PropertyNode,
|
|
isIdentifierNode,
|
|
isVariableDeclarator,
|
|
isObjectExpression,
|
|
isLiteralNode,
|
|
isPropertyNode,
|
|
isPropertyAFunctionNode,
|
|
getAST,
|
|
extractIdentifierInfoFromCode,
|
|
entityRefactorFromCode,
|
|
extractInvalidTopLevelMemberExpressionsFromCode,
|
|
getFunctionalParamsFromNode,
|
|
isTypeOfFunction,
|
|
MemberExpressionData,
|
|
IdentifierInfo,
|
|
} from "./src";
|
|
|
|
// constants
|
|
import { ECMA_VERSION, SourceType, NodeTypes } from "./src/constants";
|
|
|
|
// JSObjects
|
|
import { parseJSObjectWithAST } from "./src/jsObject";
|
|
|
|
// types or intefaces should be exported with type keyword, while enums can be exported like normal functions
|
|
export type {
|
|
ObjectExpression,
|
|
PropertyNode,
|
|
MemberExpressionData,
|
|
IdentifierInfo,
|
|
};
|
|
|
|
export {
|
|
isIdentifierNode,
|
|
isVariableDeclarator,
|
|
isObjectExpression,
|
|
isLiteralNode,
|
|
isPropertyNode,
|
|
isPropertyAFunctionNode,
|
|
getAST,
|
|
extractIdentifierInfoFromCode,
|
|
entityRefactorFromCode,
|
|
extractInvalidTopLevelMemberExpressionsFromCode,
|
|
getFunctionalParamsFromNode,
|
|
isTypeOfFunction,
|
|
parseJSObjectWithAST,
|
|
ECMA_VERSION,
|
|
SourceType,
|
|
NodeTypes,
|
|
};
|