mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-20 23:04:06 +00:00
Rename to ts (#92)
Rename Remove ts-nocheck, fix errors Update state when graph cleared via UI (#88) Convert to ts, fix imports Co-authored-by: pythongosssss <125205205+pythongosssss@users.noreply.github.com>
This commit is contained in:
@@ -136,14 +136,17 @@ export function downloadBlob(filename, blob) {
|
||||
}, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @template T
|
||||
* @param {string} name
|
||||
* @param {T} [defaultValue]
|
||||
* @param {(currentValue: any, previousValue: any)=>void} [onChanged]
|
||||
* @returns {T}
|
||||
*/
|
||||
export function prop(target, name, defaultValue, onChanged) {
|
||||
export function prop<T>(
|
||||
target: object,
|
||||
name: string,
|
||||
defaultValue: T,
|
||||
onChanged?: (
|
||||
currentValue: T,
|
||||
previousValue: T,
|
||||
target: object,
|
||||
name: string
|
||||
) => void
|
||||
): T {
|
||||
let currentValue;
|
||||
Object.defineProperty(target, name, {
|
||||
get() {
|
||||
|
||||
Reference in New Issue
Block a user