MCPcopy
hub / github.com/mui/material-ui / start

Method start

packages/mui-utils/src/useTimeout/useTimeout.ts:15–21  ·  view source on GitHub ↗

* Executes `fn` after `delay`, clearing any previously scheduled call.

(delay: number, fn: Function)

Source from the content-addressed store, hash-verified

13 * Executes `fn` after `delay`, clearing any previously scheduled call.
14 */
15 start(delay: number, fn: Function) {
16 this.clear();
17 this.currentId = setTimeout(() => {
18 this.currentId = null;
19 fn();
20 }, delay);
21 }
22
23 clear = () => {
24 if (this.currentId !== null) {

Callers 4

handleBlurVisibleFunction · 0.45
InfiniteLoading.jsFile · 0.45

Calls 2

clearMethod · 0.80
fnFunction · 0.50

Tested by

no test coverage detected