Skip to content

Commit

Permalink
fix: no truncation for printed types, fix #38
Browse files Browse the repository at this point in the history
  • Loading branch information
so1ve committed Mar 28, 2024
1 parent aa392a2 commit bfb668f
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions packages/complex-types/src/core/printer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ export class Printer {
for (const member of node.members) {
if (ts.isPropertySignature(member)) {
const stringBaseType = member.type
? this.checker.typeToString(this.getBaseType(member.type))
? this.checker.typeToString(
this.getBaseType(member.type),
undefined,
ts.TypeFormatFlags.NoTruncation,
)
: "any";

parts.push(
Expand Down Expand Up @@ -64,6 +68,8 @@ export class Printer {
const valueType = this.checker.getTypeOfSymbol(property);
const stringValueType = this.checker.typeToString(
this.getBaseType(valueType),
undefined,
ts.TypeFormatFlags.NoTruncation,
);
parts.push(
`${this.checker.symbolToString(
Expand Down Expand Up @@ -111,7 +117,11 @@ export class Printer {
const parameters = c.getParameters();
const event = parameters[0];

return this.checker.typeToString(this.checker.getTypeOfSymbol(event));
return this.checker.typeToString(
this.checker.getTypeOfSymbol(event),
undefined,
ts.TypeFormatFlags.NoTruncation,
);
});
}

Expand Down

0 comments on commit bfb668f

Please sign in to comment.