Skip to content

Commit cfc8c1a

Browse files
authored
Merge pull request #202 from mattpocock/changeset-release/main
Version Packages
2 parents b5668c9 + 9733df4 commit cfc8c1a

5 files changed

+41
-44
lines changed

.changeset/metal-moose-march.md

-7
This file was deleted.

.changeset/rude-knives-deny.md

-15
This file was deleted.

.changeset/tender-socks-rush.md

-21
This file was deleted.

CHANGELOG.md

+40
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,45 @@
11
# @total-typescript/ts-reset
22

3+
## 0.6.0
4+
5+
### Minor Changes
6+
7+
- 6574858: Added a rule, `/map-constructor`, to default `Map` to `Map<unknown, unknown>` when no arguments are passed to the constructor.
8+
9+
Before, you'd get `any` for both key and value types. Now, the result of `Map.get` is `unknown` instead of `any`:
10+
11+
```ts
12+
const userMap = new Map();
13+
14+
const value = userMap.get("matt"); // value: unknown
15+
```
16+
17+
This now is part of the recommended rules.
18+
19+
- 5bf3a15: Added a rule, `/promise-catch`, to change the `catch` method to take `unknown` instead of `any` as an argument.
20+
21+
```ts
22+
const promise = Promise.reject("error");
23+
24+
// BEFORE
25+
26+
promise.catch((error) => {
27+
console.error(error); // error is any!
28+
});
29+
30+
// AFTER
31+
32+
promise.catch((error) => {
33+
console.error(error); // error is unknown!
34+
});
35+
```
36+
37+
### Patch Changes
38+
39+
- 53cee4f: author: @none23
40+
41+
Fixed a bug where running .filter on a union of arrays would not work.
42+
343
## 0.5.1
444

545
### Patch Changes

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@total-typescript/ts-reset",
3-
"version": "0.5.1",
3+
"version": "0.6.0",
44
"description": "A CSS reset for TypeScript, improving types for common JavaScript API's",
55
"private": false,
66
"repository": "https://github.com/total-typescript/ts-reset",

0 commit comments

Comments
 (0)