mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-09 07:00:06 +00:00
[TS] Use strict mode in LGraphNode - initial (#598)
- Part of effort to convert LGraphNode to TS strict - Adds some small runtime changes - no impact expected, but it is possible - Runtime changes are in separate commits from compile-time type changes - Risk of downstream impact is low
This commit is contained in:
@@ -13,6 +13,12 @@ export type NullableProperties<T> = {
|
||||
[P in keyof T]: T[P] | null
|
||||
}
|
||||
|
||||
/**
|
||||
* If {@link T} is `null` or `undefined`, evaluates to {@link Result}. Otherwise, evaluates to {@link T}.
|
||||
* Useful for functions that return e.g. `undefined` when a param is nullish.
|
||||
*/
|
||||
export type WhenNullish<T, Result> = T & {} | (T extends null ? Result : T extends undefined ? Result : T & {})
|
||||
|
||||
export type CanvasColour = string | CanvasGradient | CanvasPattern
|
||||
|
||||
/** An object containing a set of child objects */
|
||||
|
||||
Reference in New Issue
Block a user