Skip to content

Commit

Permalink
feat(commonjs): add requireReturnsDefault to types (#579)
Browse files Browse the repository at this point in the history
  • Loading branch information
chengcyber committed Sep 21, 2020
1 parent a6ff567 commit da12cf9
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions packages/commonjs/types/index.d.ts
Expand Up @@ -55,6 +55,22 @@ interface RollupCommonJSOptions {
* like `"/Users/John/Desktop/foo-project/"` -> `"/"`.
*/
dynamicRequireTargets?: string | ReadonlyArray<string>;
/**
* Controls what is returned when requiring an ES module or external dependency
* from a CommonJS file. By default, this plugin will render it as a namespace
* import, i.e.
*
* ```js
* // input
* const foo = require('foo');
*
* // output
* import * as foo from 'foo';
* ```
*
* @default false
*/
requireReturnsDefault?: boolean | 'auto' | 'preferred' | ((id: string) => boolean | 'auto' | 'preferred');
}

/**
Expand Down

0 comments on commit da12cf9

Please sign in to comment.