source: imaps-frontend/node_modules/import-fresh/index.d.ts

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 432 bytes
RevLine 
[d565449]1/**
2Import a module while bypassing the cache.
3
4@example
5```
6// foo.js
7let i = 0;
8module.exports = () => ++i;
9
10// index.js
11import importFresh = require('import-fresh');
12
13require('./foo')();
14//=> 1
15
16require('./foo')();
17//=> 2
18
19importFresh('./foo')();
20//=> 1
21
22importFresh('./foo')();
23//=> 1
24
25const foo = importFresh<typeof import('./foo')>('./foo');
26```
27*/
28declare function importFresh<T>(moduleId: string): T;
29
30export = importFresh;
Note: See TracBrowser for help on using the repository browser.