File tree Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @signalwire/core ' : patch
3+ ---
4+
5+ Fix Prettify preserving callable objects types
Original file line number Diff line number Diff line change @@ -134,13 +134,13 @@ export type Promisify<T> = {
134134/*
135135 * Flattens object types for better IDE display while preserving function types
136136 */
137- export type Prettify < T > = T extends ( ...args : any [ ] ) => any
138- ? T // Preserve function types as-is
139- : T extends object
140- ? {
141- [ K in keyof T ] : T [ K ]
142- } & { }
143- : T
137+ export type Prettify < T > = T extends { ( ...args : any [ ] ) : any }
138+ ? T // Preserve callable objects (functions with properties, overloads, etc.)
139+ : T extends object
140+ ? {
141+ [ K in keyof T ] : T [ K ]
142+ } & { }
143+ : T
144144
145145/**
146146 * Construct a type that requires at least one property from `Keys` of `T`.
You can’t perform that action at this time.
0 commit comments