@deepkit/core
Advanced tools
Comparing version 1.0.1-alpha.94 to 1.0.1-alpha.97
@@ -0,1 +1,4 @@ | ||
/// <reference types="node" /> | ||
export declare const nextTick: ((cb: () => void) => number) | ((cb: () => void) => NodeJS.Timeout); | ||
export declare const clearTick: (id: any) => void; | ||
/** | ||
@@ -2,0 +5,0 @@ * Wraps a function and calls it only `cps` times per frame. |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.bufferedGate = exports.throttleTime = void 0; | ||
exports.bufferedGate = exports.throttleTime = exports.clearTick = exports.nextTick = void 0; | ||
function __assignType(fn, args) { | ||
@@ -17,4 +17,6 @@ fn.__type = args; | ||
*/ | ||
const nextTick = typeof requestAnimationFrame !== 'undefined' | ||
? __assignType((cb) => requestAnimationFrame(() => cb), ['', 'cb', 'PP$/!2""/!']) : __assignType((cb) => setTimeout(cb), ['', 'cb', 'PP$/!2""/!']); | ||
exports.nextTick = typeof requestAnimationFrame !== 'undefined' | ||
? __assignType((cb) => requestAnimationFrame(cb), ['', 'cb', 'PP$/!2""/!']) : __assignType((cb) => setTimeout(cb), ['', 'cb', 'PP$/!2""/!']); | ||
exports.clearTick = typeof requestAnimationFrame !== 'undefined' | ||
? __assignType((id) => cancelAnimationFrame(id), ['id', '', 'P"2!"/"']) : __assignType((id) => (0, exports.clearTick)(id), ['id', '', 'P"2!"/"']); | ||
/** | ||
@@ -54,3 +56,3 @@ * Wraps a function and calls it only `cps` times per frame. | ||
if (dirty) { | ||
nextTick(tick); | ||
(0, exports.nextTick)(tick); | ||
} | ||
@@ -57,0 +59,0 @@ } |
@@ -0,1 +1,4 @@ | ||
/// <reference types="node" /> | ||
export declare const nextTick: ((cb: () => void) => number) | ((cb: () => void) => NodeJS.Timeout); | ||
export declare const clearTick: (id: any) => void; | ||
/** | ||
@@ -2,0 +5,0 @@ * Wraps a function and calls it only `cps` times per frame. |
@@ -14,4 +14,6 @@ function __assignType(fn, args) { | ||
*/ | ||
const nextTick = typeof requestAnimationFrame !== 'undefined' | ||
? __assignType((cb) => requestAnimationFrame(() => cb), ['', 'cb', 'PP$/!2""/!']) : __assignType((cb) => setTimeout(cb), ['', 'cb', 'PP$/!2""/!']); | ||
export const nextTick = typeof requestAnimationFrame !== 'undefined' | ||
? __assignType((cb) => requestAnimationFrame(cb), ['', 'cb', 'PP$/!2""/!']) : __assignType((cb) => setTimeout(cb), ['', 'cb', 'PP$/!2""/!']); | ||
export const clearTick = typeof requestAnimationFrame !== 'undefined' | ||
? __assignType((id) => cancelAnimationFrame(id), ['id', '', 'P"2!"/"']) : __assignType((id) => clearTick(id), ['id', '', 'P"2!"/"']); | ||
/** | ||
@@ -18,0 +20,0 @@ * Wraps a function and calls it only `cps` times per frame. |
{ | ||
"name": "@deepkit/core", | ||
"version": "1.0.1-alpha.94", | ||
"version": "1.0.1-alpha.97", | ||
"description": "Deepkit core library", | ||
@@ -44,3 +44,3 @@ "type": "commonjs", | ||
}, | ||
"gitHead": "bc07bf9daea95879915e7871e833560844197700" | ||
"gitHead": "2112f2773b6781c98e2271d55a996ffb9da5f89c" | ||
} |
@@ -11,5 +11,9 @@ /* | ||
const nextTick = typeof requestAnimationFrame !== 'undefined' | ||
? (cb: () => void) => requestAnimationFrame(() => cb) : (cb: () => void) => setTimeout(cb); | ||
export const nextTick = typeof requestAnimationFrame !== 'undefined' | ||
? (cb: () => void) => requestAnimationFrame(cb) : (cb: () => void) => setTimeout(cb); | ||
export const clearTick = typeof requestAnimationFrame !== 'undefined' | ||
? (id: any) => cancelAnimationFrame(id) : (id: any) => clearTick(id); | ||
/** | ||
@@ -16,0 +20,0 @@ * Wraps a function and calls it only `cps` times per frame. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
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
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
424011
6964