UNPKG

@cc-heart/utils

Version:

🔧 javascript common tools collection

8 lines (7 loc) • 311 B
/** * Creates a function that can only be called once. * * @param {(...args: any) => any} fn - The function to be called once. * @returns {(...args: any) => any} - A new function that can only be called once. */ export declare function useOnce(fn: (...args: any) => any): (this: any, ...args: any) => any;