mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-27 09:45:13 +00:00
[TS] Add strict nullability to LGraphCanvas (#669)
- Updates typing in copy & paste - Clean up
This commit is contained in:
@@ -19,6 +19,9 @@ export type NullableProperties<T> = {
|
||||
*/
|
||||
export type WhenNullish<T, Result> = T & {} | (T extends null ? Result : T extends undefined ? Result : T & {})
|
||||
|
||||
/** A type with each of the {@link Properties} made optional. */
|
||||
export type OptionalProps<T, Properties extends keyof T> = Omit<T, Properties> & { [K in Properties]?: T[K] }
|
||||
|
||||
export type CanvasColour = string | CanvasGradient | CanvasPattern
|
||||
|
||||
/** An object containing a set of child objects */
|
||||
|
||||
Reference in New Issue
Block a user