mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-01 15:50:13 +00:00
Fixed Cache methods
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import ejs = require("ejs");
|
||||
import * as fs from 'graceful-fs';
|
||||
import LRU = require("lru-cache");
|
||||
import { TemplateFunction } from "ejs";
|
||||
|
||||
const fileName = 'test.ejs';
|
||||
const people = ['geddy', 'neil', 'alex'];
|
||||
@@ -33,3 +35,5 @@ ejs.compile(template, options);
|
||||
ejs.fileLoader = (str: string) => str;
|
||||
|
||||
ejs.clearCache();
|
||||
|
||||
ejs.cache = LRU(100);
|
||||
|
||||
3
types/ejs/index.d.ts
vendored
3
types/ejs/index.d.ts
vendored
@@ -107,8 +107,7 @@ export function escapeRegexChars(s: string): string;
|
||||
*/
|
||||
export function escapeXML(markup: string): string;
|
||||
export interface Cache {
|
||||
_data: { [name: string]: TemplateFunction; };
|
||||
set(key: string, val: TemplateFunction): TemplateFunction;
|
||||
set(key: string, val: TemplateFunction): void;
|
||||
get(key: string): TemplateFunction;
|
||||
}
|
||||
export let delimiter: string;
|
||||
|
||||
Reference in New Issue
Block a user