UNPKG

@storm-stack/core

Version:

A build toolkit and runtime used by Storm Software in TypeScript applications

26 lines (23 loc) 663 B
import { createTransformer, createDeclarationTransformer } from './chunk-JGLRQUIS.js'; import { __name } from './chunk-IRPJW6HH.js'; import ts from 'typescript'; function transpile(context, id, code, options = {}) { const transformer = createTransformer(context, options); const declarationTransformer = createDeclarationTransformer(context, options); return ts.transpileModule(code, { compilerOptions: { ...context.tsconfig.options }, fileName: id, transformers: { before: [ transformer ], after: [ declarationTransformer ] } }); } __name(transpile, "transpile"); export { transpile };