@rxap/ts-morph
Version:
Provides utilities for manipulating TypeScript code using the ts-morph library. It offers a fluent API to add, modify, and remove code elements such as classes, decorators, imports, and properties in both Angular and NestJS projects. This package simplifi
24 lines • 1.09 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.CoerceNestThrottlerModuleImport = CoerceNestThrottlerModuleImport;
const ts_morph_1 = require("ts-morph");
const coerce_nest_module_import_1 = require("./coerce-nest-module-import");
function CoerceNestThrottlerModuleImport(sourceFile, options) {
(0, coerce_nest_module_import_1.CoerceNestModuleImport)(sourceFile, Object.assign(Object.assign({}, options), { moduleName: 'ThrottlerModule', structures: [
{
moduleSpecifier: '@nestjs/throttler',
namedImports: ['ThrottlerModule'],
},
{
moduleSpecifier: '@rxap/nest-utilities',
namedImports: ['ThrottlerModuleOptionsLoader'],
}
], importWriter: w => {
w.writeLine('ThrottlerModule.forRootAsync(');
ts_morph_1.Writers.object({
useClass: 'ThrottlerModuleOptionsLoader',
})(w);
w.write(')');
} }));
}
//# sourceMappingURL=coerce-nest-throttler-module-import.js.map