enum-iife-transformer
Advanced tools
Comparing version 1.0.1 to 1.0.2
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.transform = exports.EnumIIFETransformerFactory = void 0; | ||
exports.enumIIFE = exports.enumIIFETransformerFactory = void 0; | ||
/** | ||
@@ -9,7 +9,7 @@ * Created by rockyl on 2022/8/31. | ||
const { EnumDeclaration: EnumDeclarationKind, ClassDeclaration, ExportKeyword, MultiLineCommentTrivia, } = typescript_1.SyntaxKind; | ||
function EnumIIFETransformerFactory() { | ||
function enumIIFETransformerFactory() { | ||
return function (context) { | ||
const visitor = (node) => { | ||
if ((0, typescript_1.isSourceFile)(node)) { | ||
return transform(node, context); | ||
return enumIIFE(node, context); | ||
} | ||
@@ -21,4 +21,4 @@ return node; | ||
} | ||
exports.EnumIIFETransformerFactory = EnumIIFETransformerFactory; | ||
function transform(sourceFile, context) { | ||
exports.enumIIFETransformerFactory = enumIIFETransformerFactory; | ||
function enumIIFE(sourceFile, context) { | ||
const { factory } = context; | ||
@@ -68,3 +68,3 @@ const { statements } = sourceFile; | ||
} | ||
exports.transform = transform; | ||
exports.enumIIFE = enumIIFE; | ||
//# sourceMappingURL=index.js.map |
@@ -5,3 +5,3 @@ /** | ||
import { SourceFile, TransformationContext } from "typescript"; | ||
export declare function EnumIIFETransformerFactory(): (context: any) => (node: any) => any; | ||
export declare function transform(sourceFile: SourceFile, context: TransformationContext): SourceFile; | ||
export declare function enumIIFETransformerFactory(): (context: any) => (node: any) => any; | ||
export declare function enumIIFE(sourceFile: SourceFile, context: TransformationContext): SourceFile; |
{ | ||
"name": "enum-iife-transformer", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"main": "dist/index.js", | ||
"types": "dits/types/index.d.ts", | ||
"types": "dist/types/index.d.ts", | ||
"license": "MIT", | ||
@@ -7,0 +7,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
5838