fix: add missing state property to interface#1579
Conversation
|
Thanks for taking the initiative to open a PR. What about adding a test to make sure this doesn't get broken in the future? |
|
@deer I could not find any references on how to test pure Typescript changes/types. There's no existing export default function NotFound(props: UnknownPageProps<{ foo: number }, { bar: boolean }>) {
props.data.foo satisfies number;
props.state.bar satisfies boolean;
}The above would be enough to test the |
|
I meant a functional test that confirms the state is actually passed into the test _404 page. Currently there's a |
|
I gave it a try. I added some types for the generics, and updated the Let me know what you think 😄 |
deer
left a comment
There was a problem hiding this comment.
I think this testing approach is fine.
marvinhagemeister
left a comment
There was a problem hiding this comment.
LGTM, thanks for making a PR 👍
|
Looks like the CI is failing due to formatting issues. You can resolve these by running |
Corrects the props interface used in 404 pages to reflect that `state` is available as well. Closes #1578
|
Sorry, thought I had format on automatically on save, and workflow did not when I made the PR. Hope fully it should be OK now 😀 |
Corrects the props interface used in 404 pages to reflect that
stateis available as well.Closes #1578