mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-03 12:10:11 +00:00
[TS] TS type fix & nits (#801)
Fixes downstream type specificity issues with UUID template type. No real benefit from template literal type at present.
This commit is contained in:
@@ -3,7 +3,12 @@ import type { Point, ReadOnlyRect, Rect, Rect32 } from "./interfaces"
|
||||
import { EaseFunction } from "./litegraph"
|
||||
|
||||
export interface DragAndScaleState {
|
||||
/**
|
||||
* The offset from the top-left of the current canvas viewport to `[0, 0]` in graph space.
|
||||
* Or said another way, the inverse offset of the viewport.
|
||||
*/
|
||||
offset: Point
|
||||
/** The scale of the graph. */
|
||||
scale: number
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
export type UUID = `${string}-${string}-${string}-${string}-${string}`
|
||||
// Using a template string for this is resulting in complex type workarounds. No current benefit beyond dev reading.
|
||||
export type UUID = string
|
||||
|
||||
/** Special-case zero-UUID, consisting entirely of zeros. Used as a default value. */
|
||||
export const zeroUuid = "00000000-0000-0000-0000-000000000000"
|
||||
|
||||
Reference in New Issue
Block a user