source: trip-planner-front/node_modules/import-fresh/index.d.ts@ 1ad8e64

Last change on this file since 1ad8e64 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 432 bytes
Line 
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.