Skip to content

Commit

Permalink
fix(plugin): pass options to type literal node initializer factory
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilmysliwiec committed Jul 4, 2023
1 parent 43a244b commit 8d852c9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/plugin/visitors/model-class.visitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,8 @@ export class ModelClassVisitor extends AbstractFileVisitor {
factory,
typeChecker,
existingProperties,
hostFilename
hostFilename,
options
);
return [factory.createPropertyAssignment(key, initializer)];
} else if (ts.isUnionTypeNode(node)) {
Expand Down Expand Up @@ -402,15 +403,16 @@ export class ModelClassVisitor extends AbstractFileVisitor {
factory: ts.NodeFactory,
typeChecker: ts.TypeChecker,
existingProperties: ts.NodeArray<ts.PropertyAssignment>,
hostFilename: string
hostFilename: string,
options: PluginOptions
) {
const propertyAssignments = Array.from(node.members || []).map((member) => {
const literalExpr = this.createDecoratorObjectLiteralExpr(
factory,
member as ts.PropertySignature,
typeChecker,
existingProperties,
{},
options,
hostFilename
);
return factory.createPropertyAssignment(
Expand Down

0 comments on commit 8d852c9

Please sign in to comment.