Skip to content

Commit

Permalink
chore(deps): update dependency expect-type to v0.20.0
Browse files Browse the repository at this point in the history
##### [`v0.20.0](https://github.com/mmkal/expect-type/releases/tag/v0.20.0)

#### Breaking changes

-   improve overloads support, attempt 2 by [@mmkal](https://github.com/mmkal) in mmkal/expect-type#83

This change updates how overloaded functions are treated. Now, `.parameters` gives you a *union* of the parameter-tuples that a function can take. For example, given the following type:

```ts
type Factorize = {
  (input: number): number[]
  (input: bigint): bigint[]
}
```

Behvaiour before:

```ts
expectTypeOf<Factorize>().parameters.toEqualTypeOf<[bigint]>()
```

Behaviour now:

```ts
expectTypeOf<Factorize>().parameters.toEqualTypeOf<[number] | [bigint]>()
```

There were similar changes for `.returns`, `.parameter(...)`, and `.toBeCallableWith`. Also, overloaded functions are now differentiated properly when using `.branded.toEqualTypeOf` (this was a bug that it seems nobody found).

See [#83](mmkal/expect-type#83) for more details or look at the updated docs (including a new section called "[Overloaded functions](https://github.com/mmkal/expect-type#overloaded-functions)", which has more info on how this behaviour differs for TypeScript versions before 5.3).

#### What's Changed

-   Fix rendering issue in readme by [@mrazauskas](https://github.com/mrazauskas) in mmkal/expect-type#69
-   Fix minor issues in docs by [@aryaemami59](https://github.com/aryaemami59) in mmkal/expect-type#91
-   create utils file by [@mmkal](https://github.com/mmkal) in mmkal/expect-type#93
-   branding.ts and messages.ts by [@mmkal](https://github.com/mmkal) in mmkal/expect-type#95
-   improve overloads support, attempt 2 by [@mmkal](https://github.com/mmkal) in mmkal/expect-type#83
-   Extends: explain myself  [`1e37116`](mmkal/expect-type@1e37116)
-   Mark internal APIs with `@internal` JSDoc tag ([#104](mmkal/expect-type#104))  [`4c40b07`](mmkal/expect-type@4c40b07)
-   Re-export everything in `overloads.ts` file ([#107](mmkal/expect-type#107))  [`5ee0181`](mmkal/expect-type@5ee0181)
-   JSDoc improvements ([#100](mmkal/expect-type#100))  [`0bbeffa`](mmkal/expect-type@0bbeffa)

**Full Changelog**: mmkal/expect-type@v0.19.0...v0.20.0
  • Loading branch information
renovate[bot] committed Aug 22, 2024
1 parent 4b6d04c commit 6a65c1e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"@types/node": "20.16.1",
"eslint-plugin-mmkal": "0.9.0",
"execa": "9.3.1",
"expect-type": "0.19.0",
"expect-type": "0.20.0",
"fs-syncer": "0.5.3",
"np": "10.0.7",
"pkg-pr-new": "^0.0.20",
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6a65c1e

Please sign in to comment.