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.
70 lines (33 loc) • 1.26 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [rc-js-util](./rc-js-util.md) > [fpRunWithin](./rc-js-util.fprunwithin.md)
## fpRunWithin() function
Runs the `callback` within the `wrapperFunctions`<!-- -->. This is useful for "positional" attributes, like debug labels, lifecycle block scopes etc.
**Signature:**
```typescript
export declare function fpRunWithin<TCallback extends (...args: unknown[]) => unknown>(wrapperFunctions: readonly ((callback: () => ReturnType<TCallback>) => ReturnType<TCallback>)[], callback: TCallback): (...args: Parameters<TCallback>) => ReturnType<TCallback>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
wrapperFunctions
</td><td>
readonly ((callback: () => ReturnType<TCallback>) => ReturnType<TCallback>)\[\]
</td><td>
</td></tr>
<tr><td>
callback
</td><td>
TCallback
</td><td>
</td></tr>
</tbody></table>
**Returns:**
(...args: Parameters<TCallback>) => ReturnType<TCallback>
## Remarks
See [fpRunWithin()](./rc-js-util.fprunwithin.md)<!-- -->.