UNPKG

rc-js-util

Version:

A collection of TS and C++ utilities to help writing performant and correct applications, achieved through strict typing and (removable) invariant checking.

56 lines (27 loc) 819 B
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [rc-js-util](./rc-js-util.md) &gt; [fpOnce](./rc-js-util.fponce.md) ## fpOnce() function Creates a function that can be called many times but will run at most once. **Signature:** ```typescript export declare function fpOnce<TArgs extends unknown[], TRet>(initialize: (...args: TArgs) => TRet): (...args: TArgs) => TRet; ``` ## Parameters <table><thead><tr><th> Parameter </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td> initialize </td><td> (...args: TArgs) =&gt; TRet </td><td> </td></tr> </tbody></table> **Returns:** (...args: TArgs) =&gt; TRet ## Remarks See [fpOnce()](./rc-js-util.fponce.md)<!-- -->.