UNPKG

@lifeart/gxt

Version:

<img align="right" width="95" height="95" alt="Philosopher’s stone, logo of PostCSS" src="./public/logo.png">

18 lines (17 loc) • 882 B
/** * The `fn` helper for currying functions with bound arguments. * * Important: We only unwrap getter functions (arrow functions with no prototype), * NOT Cells. This is because: * - Getters like `() => this.value` should be evaluated at call time * - But Cells passed as arguments should remain as Cells so callbacks can call `.update()` on them * * Example: `{{fn this.updateCell this.myCell}}` - myCell should stay as a Cell * * Design notes: * - This helper is designed to work with IS_GLIMMER_COMPAT_MODE=true (the default) * - In compat mode, the compiler wraps arguments in getters for reactivity * - We unwrap these getters at call time, but preserve Cells for callback use * - Unlike `unwrap()` which unwraps both getters AND Cells, this only unwraps getters */ export declare function $__fn(fn: Function, ...args: unknown[]): (...tail: unknown[]) => any;