UNPKG

@storm-stack/core

Version:

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

52 lines (46 loc) 2.13 kB
'use strict'; var chunkGRNJVY7I_cjs = require('./chunk-GRNJVY7I.cjs'); var type_compiler_star = require('@deepkit/type-compiler'); function _interopNamespace(e) { if (e && e.__esModule) return e; var n = Object.create(null); if (e) { Object.keys(e).forEach(function (k) { if (k !== 'default') { var d = Object.getOwnPropertyDescriptor(e, k); Object.defineProperty(n, k, d.get ? d : { enumerable: true, get: function () { return e[k]; } }); } }); } n.default = e; return Object.freeze(n); } var type_compiler_star__namespace = /*#__PURE__*/_interopNamespace(type_compiler_star); // src/deepkit/type-compiler.ts var type_compiler_exports = {}; chunkGRNJVY7I_cjs.__reExport(type_compiler_exports, type_compiler_star__namespace); var cache = new type_compiler_exports.Cache(); function createTransformer(context, options = {}) { return /* @__PURE__ */ chunkGRNJVY7I_cjs.__name(function transformer(ctx) { cache.tick(); return new type_compiler_exports.ReflectionTransformer(ctx, cache).withReflection({ reflection: options.reflectionMode || "default", reflectionLevel: options.reflectionLevel || context.tsconfig.tsconfigJson.compilerOptions?.reflectionLevel || context.tsconfig.tsconfigJson.reflectionLevel || "minimal" }); }, "transformer"); } chunkGRNJVY7I_cjs.__name(createTransformer, "createTransformer"); function createDeclarationTransformer(context, options = {}) { return /* @__PURE__ */ chunkGRNJVY7I_cjs.__name(function declarationTransformer(ctx) { return new type_compiler_exports.DeclarationTransformer(ctx, cache).withReflection({ reflection: options.reflectionMode || "default", reflectionLevel: options.reflectionLevel || context.tsconfig.tsconfigJson.compilerOptions?.reflectionLevel || context.tsconfig.tsconfigJson.reflectionLevel || "minimal" }); }, "declarationTransformer"); } chunkGRNJVY7I_cjs.__name(createDeclarationTransformer, "createDeclarationTransformer"); exports.createDeclarationTransformer = createDeclarationTransformer; exports.createTransformer = createTransformer;