Skip to content

Commit

Permalink
chore: fixed generic type class Cache (hexojs/hexo-util#308)
Browse files Browse the repository at this point in the history
from package `hexo-util`
  • Loading branch information
dimaslanjaka committed May 15, 2023
1 parent ab0858d commit 959c7d5
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions lib/hexo/locals.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
import { Cache } from 'hexo-util';
import { HexoLocalsData } from './locals-d';


class Locals {
public cache: {
cache: Map<string, HexoLocalsData>;
set(id: string, value: HexoLocalsData): void;
has(id: string): boolean;
get(id: string): HexoLocalsData;
del(id: string): void;
apply<T>(id: string, value: T): T;
flush(): void;
size(): number;
dump(): {
[k: string]: HexoLocalsData;
};
};
public cache: Cache<HexoLocalsData>;
public getters: Record<string, HexoLocalsData>;

constructor() {
Expand Down

0 comments on commit 959c7d5

Please sign in to comment.