Skip to content

Commit

Permalink
fix: add missing __VLS_Prettify type for withDefaults() (#3691)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk authored Oct 26, 2023
1 parent 46ae2ff commit 50d10c1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/language-core/src/generators/script.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ export function generate(
default: D[K]
}> : P[K]
};\n`);
codes.push(`type __VLS_Prettify<T> = { [K in keyof T]: T[K]; } & {};\n`);
}
if (usedHelperTypes.WithTemplateSlots) {
codes.push(
Expand Down
3 changes: 3 additions & 0 deletions packages/tsc/tests/__snapshots__/dts.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@ type __VLS_WithDefaults<P, D> = {
default: D[K];
}> : P[K];
};
type __VLS_Prettify<T> = {
[K in keyof T]: T[K];
} & {};
"
`;
Expand Down

0 comments on commit 50d10c1

Please sign in to comment.