NativeScript 9.1 Released → V8 14.9, Vite 8 HMR, built for rapid agentic visual iteration
Dig in
ts
function debounce(
   fn: any, 
   delay?: number, 
   param2?: {
  leading?: boolean;
}): (...args: any[]) => void;

Defined in: utils/shared.ts

Creates a debounced function that delays invoking the provided function until after a specified delay

Parameters

ParameterTypeDescription
fnanyThe function to debounce
delay?numberThe number of milliseconds to delay
param2?{ leading?: boolean; }Options for the debounce behavior
param2.leading?boolean-

Returns

A new debounced function

(...args: any[]) => void