UNPKG

next-yak

Version:

next-yak is a CSS-in-JS solution tailored for Next.js that seamlessly combines the expressive power of styled-components syntax with efficient build-time extraction of CSS using Next.js's built-in CSS configuration

30 lines 1.17 kB
//#region isolated-source-eval/evaluator.d.ts type EvaluateResult = { ok: true; value: Record<string, unknown>; dependencies: string[]; } | { ok: false; error: { message: string; stack: string; }; }; interface Evaluator { /** Evaluate a module and return its exports plus the full transitive dependency list. */ evaluate(absolutePath: string): Promise<EvaluateResult>; /** Clear cached results for every entry point that transitively depends on the given file(s). */ invalidate(...absolutePaths: string[]): void; /** Clear the entire result cache and swap workers. */ invalidateAll(): void; /** Return entry point paths that would be affected by invalidate(absolutePath). */ getDependentsOf(absolutePath: string): string[]; /** Terminate both workers and reject any pending evaluations. */ dispose(): Promise<void>; [Symbol.asyncDispose](): Promise<void>; } /** Creates an evaluator that runs modules in isolated worker threads with dependency tracking. */ declare function createEvaluator(): Promise<Evaluator>; //#endregion export { type EvaluateResult, type Evaluator, createEvaluator }; //# sourceMappingURL=index.d.ts.map