@voltiso/transform
Advanced tools
Comparing version 1.1.4 to 2.0.0
import * as ts from 'typescript'; | ||
export declare function voltisoTransform(program: ts.Program, _pluginOptions: {}): (ctx: ts.TransformationContext) => (sourceFile: ts.SourceFile) => ts.SourceFile; | ||
export declare type VoltisoTransformOptions = { | ||
onInlineError?: 'fail' | undefined; | ||
}; | ||
export declare function voltisoTransform(program: ts.Program, pluginOptions: VoltisoTransformOptions): (ctx: ts.TransformationContext) => (sourceFile: ts.SourceFile) => ts.SourceFile; | ||
//# sourceMappingURL=voltisoTransform.d.ts.map |
@@ -35,3 +35,3 @@ "use strict"; | ||
const ts = __importStar(require("typescript")); | ||
function voltisoTransform(program, _pluginOptions) { | ||
function voltisoTransform(program, pluginOptions) { | ||
const typeChecker = program.getTypeChecker(); | ||
@@ -207,2 +207,4 @@ // function collectSymbols(node: ts.Node): ts.Symbol[] { | ||
console.warn(chalk_1.default.bgRed(message)); | ||
if (pluginOptions.onInlineError === 'fail') | ||
throw new Error(message); | ||
} | ||
@@ -219,2 +221,4 @@ const importTypeNodes = collectNodesOfKind(newNode, ts.SyntaxKind.ImportType); | ||
console.warn(chalk_1.default.bgRed(message)); | ||
if (pluginOptions.onInlineError === 'fail') | ||
throw new Error(message); | ||
} | ||
@@ -221,0 +225,0 @@ } |
import * as ts from 'typescript'; | ||
export declare function voltisoTransform(program: ts.Program, _pluginOptions: {}): (ctx: ts.TransformationContext) => (sourceFile: ts.SourceFile) => ts.SourceFile; | ||
export declare type VoltisoTransformOptions = { | ||
onInlineError?: 'fail' | undefined; | ||
}; | ||
export declare function voltisoTransform(program: ts.Program, pluginOptions: VoltisoTransformOptions): (ctx: ts.TransformationContext) => (sourceFile: ts.SourceFile) => ts.SourceFile; | ||
//# sourceMappingURL=voltisoTransform.d.ts.map |
@@ -6,3 +6,3 @@ // ⠀ⓥ 2022 🌩 🌩 ⠀ ⠀ | ||
import * as ts from 'typescript'; | ||
export function voltisoTransform(program, _pluginOptions) { | ||
export function voltisoTransform(program, pluginOptions) { | ||
const typeChecker = program.getTypeChecker(); | ||
@@ -178,2 +178,4 @@ // function collectSymbols(node: ts.Node): ts.Symbol[] { | ||
console.warn(chalk.bgRed(message)); | ||
if (pluginOptions.onInlineError === 'fail') | ||
throw new Error(message); | ||
} | ||
@@ -190,2 +192,4 @@ const importTypeNodes = collectNodesOfKind(newNode, ts.SyntaxKind.ImportType); | ||
console.warn(chalk.bgRed(message)); | ||
if (pluginOptions.onInlineError === 'fail') | ||
throw new Error(message); | ||
} | ||
@@ -192,0 +196,0 @@ } |
{ | ||
"name": "@voltiso/transform", | ||
"version": "1.1.4", | ||
"version": "2.0.0", | ||
"license": "MIT", | ||
@@ -42,4 +42,8 @@ "repository": "git://github.com/voltiso/mono.git", | ||
"build": "v build", | ||
"build:esm": "tsc -b tsconfig.build.esm.json", | ||
"build:cjs": "tsc -b tsconfig.build.cjs.json", | ||
"build:cjs": "run-s build:cjs:clean build:cjs:tsc", | ||
"build:cjs:clean": "rimraf dist/cjs", | ||
"build:cjs:tsc": "tsc -b tsconfig.build.cjs.json", | ||
"build:esm": "run-s build:esm:clean build:esm:tsc", | ||
"build:esm:clean": "rimraf dist/esm", | ||
"build:esm:tsc": "tsc -b tsconfig.build.esm.json", | ||
"__________PREPARE": "__________", | ||
@@ -46,0 +50,0 @@ "__________MISC": "__________", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
52334
646