@tldraw/utils
Advanced tools
Comparing version 3.6.0-canary.f8d56a61da08 to 3.6.0
@@ -0,1 +1,22 @@ | ||
# v3.6.0 (Wed Dec 04 2024) | ||
### Release Notes | ||
#### Create a utility type for making undefined properties optional ([#5055](https://github.com/tldraw/tldraw/pull/5055)) | ||
- Expose a utility type for making undefined properties optional | ||
--- | ||
#### 🐛 Bug Fix | ||
- Create a utility type for making undefined properties optional [#5055](https://github.com/tldraw/tldraw/pull/5055) ([@trygve-aaberge-adsk](https://github.com/trygve-aaberge-adsk) [@SomeHats](https://github.com/SomeHats)) | ||
#### Authors: 2 | ||
- alex ([@SomeHats](https://github.com/SomeHats)) | ||
- Trygve Aaberge ([@trygve-aaberge-adsk](https://github.com/trygve-aaberge-adsk)) | ||
--- | ||
# v3.5.0 (Tue Nov 26 2024) | ||
@@ -2,0 +23,0 @@ |
@@ -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.f8d56a61da08", | ||
"3.6.0", | ||
"cjs" | ||
); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@tldraw/utils", | ||
"description": "A tiny little drawing app (private utilities).", | ||
"version": "3.6.0-canary.f8d56a61da08", | ||
"version": "3.6.0", | ||
"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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
515394
7631
0