Skip to content

Commit

Permalink
Merge pull request #202 from mattpocock/changeset-release/main
Browse files Browse the repository at this point in the history
Version Packages
  • Loading branch information
mattpocock authored Aug 24, 2024
2 parents b5668c9 + 9733df4 commit cfc8c1a
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 44 deletions.
7 changes: 0 additions & 7 deletions .changeset/metal-moose-march.md

This file was deleted.

15 changes: 0 additions & 15 deletions .changeset/rude-knives-deny.md

This file was deleted.

21 changes: 0 additions & 21 deletions .changeset/tender-socks-rush.md

This file was deleted.

40 changes: 40 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,45 @@
# @total-typescript/ts-reset

## 0.6.0

### Minor Changes

- 6574858: Added a rule, `/map-constructor`, to default `Map` to `Map<unknown, unknown>` when no arguments are passed to the constructor.

Before, you'd get `any` for both key and value types. Now, the result of `Map.get` is `unknown` instead of `any`:

```ts
const userMap = new Map();

const value = userMap.get("matt"); // value: unknown
```

This now is part of the recommended rules.

- 5bf3a15: Added a rule, `/promise-catch`, to change the `catch` method to take `unknown` instead of `any` as an argument.

```ts
const promise = Promise.reject("error");
// BEFORE
promise.catch((error) => {
console.error(error); // error is any!
});
// AFTER
promise.catch((error) => {
console.error(error); // error is unknown!
});
```

### Patch Changes

- 53cee4f: author: @none23

Fixed a bug where running .filter on a union of arrays would not work.

## 0.5.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@total-typescript/ts-reset",
"version": "0.5.1",
"version": "0.6.0",
"description": "A CSS reset for TypeScript, improving types for common JavaScript API's",
"private": false,
"repository": "https://github.com/total-typescript/ts-reset",
Expand Down

0 comments on commit cfc8c1a

Please sign in to comment.