You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -113,7 +104,7 @@ Corsa no longer parses the following JSDoc tags with a specific node type. They
113
104
114
105
### Miscellaneous
115
106
116
-
#### When`"strict": false`, Corsa no longer allows omitting arguments for parameters with type `undefined`, `unknown`, or `any`:
107
+
#### With`"strict": false`, Corsa no longer allows omitting arguments for parameters with type `undefined`, `unknown`, or `any`:
117
108
118
109
```js
119
110
/**@param{unknown}x*/
@@ -143,8 +134,7 @@ var x = { a: 1, b: 2 };
143
134
var entries =Object.entries(x);
144
135
```
145
136
146
-
In Strada, `entries: Array<[string, any]>`.
147
-
In Corsa it has type `Array<[string, unknown]>`, the same as in TypeScript.
137
+
In Strada, `entries: Array<[string, any]>`. In Corsa it has type `Array<[string, unknown]>`, the same as in TypeScript.
148
138
149
139
#### Values are no longer resolved as types in JSDoc type positions.
150
140
@@ -240,14 +230,13 @@ This is identical to the TypeScript rule.
240
230
241
231
#### Error messages on async functions that incorrectly return non-Promises now use the same error as TS.
242
232
243
-
#### `@typedef` and `@callback` in a class body are no longer accessible outside the class.
233
+
#### `@typedef` and `@callback` in a class body are hoisted outside the class.
244
234
245
-
They must be moved outside the class to use them outside the class.
235
+
This means the declarations are accessible outside the class and may conflict with similarly named declarations in the outer scope.
246
236
247
237
#### `@class` or `@constructor` does not make a function into a constructor function.
248
238
249
-
Corsa ignores `@class` and `@constructor`.
250
-
This makes a difference on a function without this-property assignments or associated prototype-function assignments.
239
+
Corsa ignores `@class` and `@constructor`. This makes a difference on a function without this-property assignments or associated prototype-function assignments.
251
240
252
241
#### `@param` tags now apply to at most one function.
253
242
@@ -349,32 +338,13 @@ Although classes are a much better way to write this code.
349
338
350
339
### CommonJS
351
340
352
-
#### Chained exports no longer work:
353
-
354
-
```js
355
-
exports.x=exports.y=12;
356
-
```
357
-
358
-
Now only exports `x`, not `y` as well.
359
-
360
-
#### Exporting `void 0` is no longer ignored as a special case:
361
-
362
-
```js
363
-
exports.x=void0;
364
-
// several lines later...
365
-
exports.x= theRealExport;
366
-
```
367
-
368
-
This exports `x: undefined` not `x: typeof theRealExport`.
369
-
370
-
#### Property access on `require` no longer imports a single property from a module:
371
-
372
-
```js
373
-
constx=require("y").x;
374
-
```
341
+
#### Initializing exports to `undefined`:
375
342
376
-
If you can't configure your package to use ESM syntax, you can use destructuring instead:
343
+
To accommodate the pattern of initializing CommonJS exports to `undefined` (sometimes written as `void 0`) and then subsequently assigning their intended values, when CommonJS exports have multiple assignments and an initial assignment of `undefined`, the `undefined` is ignored when determining the type of the export.
0 commit comments