Skip to content

Commit a47c153

Browse files
authored
fix(commonjs): declaration tag @default for ignoreTryCatch + fix some typos (#1370)
1 parent fb11bd3 commit a47c153

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

packages/commonjs/types/index.d.ts

+10-10
Original file line numberDiff line numberDiff line change
@@ -109,17 +109,17 @@ interface RollupCommonJSOptions {
109109
* they should be left unconverted as it requires an optional dependency
110110
* that may or may not be installed beside the rolled up package.
111111
* Due to the conversion of `require` to a static `import` - the call is
112-
* hoisted to the top of the file, outside of the `try-catch` clause.
112+
* hoisted to the top of the file, outside the `try-catch` clause.
113113
*
114-
* - `true`: All `require` calls inside a `try` will be left unconverted.
114+
* - `true`: Default. All `require` calls inside a `try` will be left unconverted.
115115
* - `false`: All `require` calls inside a `try` will be converted as if the
116116
* `try-catch` clause is not there.
117117
* - `remove`: Remove all `require` calls from inside any `try` block.
118118
* - `string[]`: Pass an array containing the IDs to left unconverted.
119-
* - `((id: string) => boolean|'remove')`: Pass a function that control
119+
* - `((id: string) => boolean|'remove')`: Pass a function that controls
120120
* individual IDs.
121121
*
122-
* @default false
122+
* @default true
123123
*/
124124
ignoreTryCatch?:
125125
| boolean
@@ -133,14 +133,14 @@ interface RollupCommonJSOptions {
133133
* NodeJS where ES modules can only import a default export from a CommonJS
134134
* dependency.
135135
*
136-
* If you set `esmExternals` to `true`, this plugins assumes that all
136+
* If you set `esmExternals` to `true`, this plugin assumes that all
137137
* external dependencies are ES modules and respect the
138138
* `requireReturnsDefault` option. If that option is not set, they will be
139139
* rendered as namespace imports.
140140
*
141141
* You can also supply an array of ids to be treated as ES modules, or a
142-
* function that will be passed each external id to determine if it is an ES
143-
* module.
142+
* function that will be passed each external id to determine whether it is
143+
* an ES module.
144144
* @default false
145145
*/
146146
esmExternals?: boolean | ReadonlyArray<string> | ((id: string) => boolean);
@@ -158,7 +158,7 @@ interface RollupCommonJSOptions {
158158
* import * as foo from 'foo';
159159
* ```
160160
*
161-
* However there are some situations where this may not be desired.
161+
* However, there are some situations where this may not be desired.
162162
* For these situations, you can change Rollup's behaviour either globally or
163163
* per module. To change it globally, set the `requireReturnsDefault` option
164164
* to one of the following values:
@@ -208,7 +208,7 @@ interface RollupCommonJSOptions {
208208
* Some modules contain dynamic `require` calls, or require modules that
209209
* contain circular dependencies, which are not handled well by static
210210
* imports. Including those modules as `dynamicRequireTargets` will simulate a
211-
* CommonJS (NodeJS-like) environment for them with support for dynamic
211+
* CommonJS (NodeJS-like) environment for them with support for dynamic
212212
* dependencies. It also enables `strictRequires` for those modules.
213213
*
214214
* Note: In extreme cases, this feature may result in some paths being
@@ -222,7 +222,7 @@ interface RollupCommonJSOptions {
222222
* To avoid long paths when using the `dynamicRequireTargets` option, you can use this option to specify a directory
223223
* that is a common parent for all files that use dynamic require statements. Using a directory higher up such as `/`
224224
* may lead to unnecessarily long paths in the generated code and may expose directory names on your machine like your
225-
* home directory name. By default it uses the current working directory.
225+
* home directory name. By default, it uses the current working directory.
226226
*/
227227
dynamicRequireRoot?: string;
228228
}

0 commit comments

Comments
 (0)