rsnext/packages/next/client/components
Tim Neutkens b9140ed40b
Add never return type for redirect() and notFound() (#42009)
Ensures cases like this work:

```
function username(user: null | User) {
  if (!user) redirect();
  return user.name;
}
```
<!--
Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change that you're making:
-->

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2022-10-27 15:07:59 -07:00
..
react-dev-overlay Create root layout (#41523) 2022-10-23 00:39:30 -07:00
static-generation-async-storage Update async storage fix (#41779) 2022-10-25 05:13:24 -07:00
app-router.tsx Add head handling (#41768) 2022-10-25 05:10:30 -07:00
dynamic.tsx Alias next/dynamic to lazy impl for appDir (#41216) 2022-10-06 17:41:27 +02:00
error-boundary.tsx Global layouts error boundary (#41305) 2022-10-11 11:17:10 +02:00
error.tsx Add default not found template (#41750) 2022-10-24 15:46:59 -07:00
headers.ts Pathname and search params SSG (#41247) 2022-10-24 18:58:10 -07:00
hooks-client-context.ts Dont apply existing externals path changing to rsc layers (#41744) 2022-10-24 18:00:44 -07:00
hooks-server-context.ts Upgrade react@experimental (#40885) 2022-09-25 21:35:05 +02:00
infinite-promise.ts Handle redirects in new router (#40396) 2022-09-20 15:28:07 +02:00
layout-router.tsx Add data attribute to div to distinguish it (#41889) 2022-10-26 22:51:16 -07:00
match-segments.ts Flush styles effects (#39268) 2022-08-03 16:21:20 +00:00
navigation.ts Pathname and search params SSG (#41247) 2022-10-24 18:58:10 -07:00
not-found.ts Add never return type for redirect() and notFound() (#42009) 2022-10-27 15:07:59 -07:00
redirect.ts Add never return type for redirect() and notFound() (#42009) 2022-10-27 15:07:59 -07:00
reducer.ts Update precompiled react to next channel (#41708) 2022-10-24 00:31:52 -07:00
render-from-template-context.tsx Client component directive: use client (#41333) 2022-10-11 10:26:45 -07:00
request-async-storage.ts BREAKING CHANGE: feat(edge): split NextCookies to RequestCookies and ResponseCookies (#41526) 2022-10-27 00:20:39 -07:00
static-generation-async-storage.ts Update async storage fix (#41779) 2022-10-25 05:13:24 -07:00
static-generation-bailout.ts Fix revalidate during dev (#41772) 2022-10-25 01:27:02 -07:00
use-reducer-with-devtools.ts misc: make useReducerWithDevtools noop on server (#41019) 2022-09-29 10:08:44 +00:00