8ded79728e
Follow up to #43903, this PR adds named slots to the generated typings, and provides better error messages for `next build`. For example, a layout can have `test` as a prop because it has `@test` co-located. But `invalid` is not a possible prop here: ![CleanShot 2022-12-09 at 21 24 21@2x](https://user-images.githubusercontent.com/3676859/206790150-0e2d7905-fad8-4b26-86ee-d5e69a5ad0f9.png) And here's the error when running `next build`: <img width="651" alt="CleanShot 2022-12-09 at 21 21 11@2x" src="https://user-images.githubusercontent.com/3676859/206789969-8bbd75bd-e7e3-4109-9e0d-d5f8f9a4bbb5.png"> ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/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` - [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) 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`](https://github.com/vercel/next.js/blob/canary/contributing.md) ## Documentation / Examples - [ ] Make sure the linting passes by running `pnpm build && pnpm lint` - [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md) |
||
---|---|---|
.. | ||
eslint | ||
helpers | ||
typescript | ||
web | ||
chalk.ts | ||
coalesced-function.ts | ||
commands.ts | ||
compile-error.ts | ||
constants.ts | ||
detect-typo.ts | ||
download-wasm-swc.ts | ||
fatal-error.ts | ||
file-exists.ts | ||
find-config.ts | ||
find-pages-dir.ts | ||
flat-readdir.ts | ||
get-package-version.ts | ||
get-project-dir.ts | ||
has-necessary-dependencies.ts | ||
import-next-warning.ts | ||
install-dependencies.ts | ||
interop-default.ts | ||
is-error.ts | ||
is-serializable-props.ts | ||
load-custom-routes.ts | ||
non-nullable.ts | ||
oxford-comma-list.ts | ||
patch-incorrect-lockfile.ts | ||
pick.ts | ||
pretty-bytes.ts | ||
recursive-copy.ts | ||
recursive-delete.ts | ||
recursive-readdir.ts | ||
redirect-status.ts | ||
resolve-from.ts | ||
server-external-packages.ts | ||
try-to-parse-path.ts | ||
verify-partytown-setup.ts | ||
verifyAndLint.ts | ||
verifyRootLayout.ts | ||
verifyTypeScriptSetup.ts | ||
with-promise-cache.ts | ||
worker.ts |