import { Decorator } from '../support_decorators/decorator.js'; import { type CacheStore } from './cache_store.js'; export interface ComputedOptions { name?: string; persist?: boolean; cache?: boolean | string; key?: string; seconds?: number; } export default class Computed extends Decorator { name: string; method: string; protected requestCachedValue: unknown; protected requestCachedPromise: Promise | undefined; options: ComputedOptions; constructor(name: string, method: string, options?: ComputedOptions); getCacheKey(): string; protected getCacheStore(): CacheStore; /** Memoized get. Use in render or when reading computed. */ getValue(): Promise; /** Thenable whose computation starts only when Edge evaluates this local. */ protected getLazyValue(): PromiseLike; /** Bust cache (local request, persisted, and app cache). */ clearCache(): Promise; hydrate(memo: any): Promise; dehydrate(context: any): Promise; render(): Promise; /** Throw when computed method is invoked as action. */ call(method: string, _params: unknown[], _returnEarly: () => void): Promise; }