DefinitelyTyped/types/p-memoize/p-memoize-tests.ts
Muhammad Fawwaz Orabi 7640f36d26 Fix issues
2018-05-14 23:14:07 +03:00

14 lines
250 B
TypeScript

import pMemoize = require('p-memoize');
import { Cache } from 'p-memoize';
const a = pMemoize(async () => Promise.resolve('Hello world!'));
const b = pMemoize(async () => Promise.resolve(1), {
maxAge: 1000,
cache: new Map()
});
a();
b();