[TS] Add strict nullability to LGraphCanvas (#669)

- Updates typing in copy & paste
- Clean up
This commit is contained in:
filtered
2025-03-02 19:34:26 +11:00
committed by GitHub
parent d597271954
commit 78175e2c1b
4 changed files with 39 additions and 31 deletions

View File

@@ -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 */