1
0
mirror of https://github.com/flarum/core.git synced 2025-08-09 01:46:35 +02:00
Files
php-flarum/js/dist-typings/common/utils/computed.d.ts
flarum-bot 3d62a6af27 Bundled output for commit d268894e61
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2021-12-27 19:02:33 +00:00

11 lines
427 B
TypeScript

import Model from '../Model';
/**
* The `computed` utility creates a function that will cache its output until
* any of the dependent values are dirty.
*
* @param dependentKeys The keys of the dependent values.
* @param compute The function which computes the value using the
* dependent values.
*/
export default function computed<T, M = Model>(...args: [...string[], (this: M, ...args: unknown[]) => T]): () => T;