DefinitelyTyped/types/mem-cache/mem-cache-tests.ts
2019-01-31 10:43:46 -02:00

11 lines
317 B
TypeScript

import Cache = require('mem-cache');
const cache = new Cache(); // $ExpectType Cache
cache.set('foo', 'bar'); // $ExpectType void
cache.get('foo'); // $ExpectType any
cache.remove('foo'); // $ExpectType void
cache.clean(); // $ExpectType void
cache.length; // $ExpectType number
cache.keys; // $ExpectType string[]