@tldraw/utils
Advanced tools
Comparing version 3.6.0-canary.4ef999c1da0e to 3.6.0-canary.5713ffaf6058
@@ -324,2 +324,13 @@ import { default as throttle } from 'lodash.throttle'; | ||
/** @public */ | ||
export declare type MakeUndefinedOptional<T extends object> = Expand<{ | ||
[P in { | ||
[K in keyof T]: undefined extends T[K] ? never : K; | ||
}[keyof T]]: T[P]; | ||
} & { | ||
[P in { | ||
[K in keyof T]: undefined extends T[K] ? K : never; | ||
}[keyof T]]?: T[P]; | ||
}>; | ||
/* Excluded from this release type: mapObjectMapValues */ | ||
@@ -326,0 +337,0 @@ |
@@ -155,5 +155,5 @@ "use strict"; | ||
"@tldraw/utils", | ||
"3.6.0-canary.4ef999c1da0e", | ||
"3.6.0-canary.5713ffaf6058", | ||
"cjs" | ||
); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@tldraw/utils", | ||
"description": "A tiny little drawing app (private utilities).", | ||
"version": "3.6.0-canary.4ef999c1da0e", | ||
"version": "3.6.0-canary.5713ffaf6058", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "tldraw Inc.", |
@@ -84,3 +84,8 @@ import { registerTldrawLibraryVersion } from './lib/version' | ||
export { Timers } from './lib/timers' | ||
export type { Expand, RecursivePartial, Required } from './lib/types' | ||
export { | ||
type Expand, | ||
type MakeUndefinedOptional, | ||
type RecursivePartial, | ||
type Required, | ||
} from './lib/types' | ||
export { safeParseUrl } from './lib/url' | ||
@@ -87,0 +92,0 @@ export { |
@@ -11,1 +11,10 @@ /** @public */ | ||
export type Required<T, K extends keyof T> = Expand<Omit<T, K> & { [P in K]-?: T[P] }> | ||
/** @public */ | ||
export type MakeUndefinedOptional<T extends object> = Expand< | ||
{ | ||
[P in { [K in keyof T]: undefined extends T[K] ? never : K }[keyof T]]: T[P] | ||
} & { | ||
[P in { [K in keyof T]: undefined extends T[K] ? K : never }[keyof T]]?: T[P] | ||
} | ||
> |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
514815
7631