@im-js/core
Advanced tools
Comparing version 1.3.0 to 1.3.1
/** | ||
* `throttleMap` 반환 함수 | ||
*/ | ||
interface ThrottleMapFunction<T extends string, V> { | ||
/** | ||
* 즉시 실행 | ||
* @param dataset | ||
*/ | ||
(dataset: Record<T, V>): void; | ||
/** | ||
* 지연 병합 실행 | ||
* @param key | ||
* @param value | ||
*/ | ||
(key: T, value: V): void; | ||
} | ||
/** | ||
* `throttleMap` 지연 실행 함수 | ||
*/ | ||
interface ThrottleCallback<T extends string, V> { | ||
(dataset: Record<T, V>): void; | ||
} | ||
/** | ||
* 인자를 객체로 병합 후 일정 시간 후 실행 | ||
* | ||
* @example | ||
* ```js | ||
* const delayedLog = throttleMap(dataset => { | ||
* console.log(dataset) | ||
* }); | ||
* // `{foo: 1, bar: 2}` 0.24초 지연 실행 | ||
* delayedLog('foo', 1); | ||
* delayedLog('bar', 2); | ||
* // `{baz: 3}` 즉시 실행 | ||
* delayedLog({baz: 3}); | ||
* ``` | ||
* @param callback | ||
* @param time | ||
*/ | ||
export declare function throttleMap<T extends string = string, V = any>(callback: (dataset: Partial<Record<T, V>>) => void, time?: number): (key: T, value: V) => void; | ||
export declare function throttleMap<T extends string = string, V = any>(callback: ThrottleCallback<T, V>, time?: number): ThrottleMapFunction<T, V>; | ||
export {}; |
{ | ||
"name": "@im-js/core", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "Present by IMR", | ||
@@ -5,0 +5,0 @@ "type": "module", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3460
60