Sha256: e4710b99a773771f491efeea09cb45f393e2173c186acd84051b7d7495e102e0

Contents?: true

Size: 432 Bytes

Versions: 66

Compression:

Stored size: 432 Bytes

Contents

/**
Import a module while bypassing the cache.

@example
```
// foo.js
let i = 0;
module.exports = () => ++i;

// index.js
import importFresh = require('import-fresh');

require('./foo')();
//=> 1

require('./foo')();
//=> 2

importFresh('./foo')();
//=> 1

importFresh('./foo')();
//=> 1

const foo = importFresh<typeof import('./foo')>('./foo');
```
*/
declare function importFresh<T>(moduleId: string): T;

export = importFresh;

Version data entries

66 entries across 65 versions & 7 rubygems

Version Path
disco_app-0.14.0 test/dummy/node_modules/babel-plugin-macros/node_modules/import-fresh/index.d.ts
disco_app-0.13.6.pre.puma.pre.3 test/dummy/node_modules/babel-plugin-macros/node_modules/import-fresh/index.d.ts
groonga-client-model-6.0.0 test/apps/rails6.1.3/node_modules/babel-plugin-macros/node_modules/import-fresh/index.d.ts
groonga-client-model-6.0.0 test/apps/rails6.0.3.5/node_modules/babel-plugin-macros/node_modules/import-fresh/index.d.ts
ruby2js-4.0.4 lib/tasks/testrails/node_modules/babel-plugin-macros/node_modules/import-fresh/index.d.ts
ruby2js-4.0.3 lib/tasks/testrails/node_modules/babel-plugin-macros/node_modules/import-fresh/index.d.ts