Skip to content
module@warp-drive/core/types/utils

Type Alias WithPartial<T, K> ​

ts
type WithPartial<T, K> = Omit<T, K> & Partial<Pick<T, K>>;

Defined in: warp-drive-packages/core/src/types/utils.ts:10

Makes the properties named in K optional on T, leaving the rest as-is.

Type Parameters ​

T ​

T

K ​

K extends keyof T

Example ​

ts
interface User { id: string; name: string; }
type PartialName = WithPartial<User, 'name'>; // { id: string; name?: string }

Released under the MIT License.