Describe the bug
$ tsc
node_modules/@types/reach__router/index.d.ts:9:37 - error TS2339: Property 'location' does not exist on type 'Window'.
9 export type WindowLocation = Window["location"] & HLocation;
~~~~~~~~~~
Found 1 error.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
No type errors
Additional context
@storybook/router is pulled in via this chain:
@storybook/react-native -> @storybook/client-api -> @storybook/router -> @types/reach__router
This dep was added in 5.2.0 to @storybook/router. I'm not sure I have an obvious solution here, unfortunately. That said, I'm not sure how @react/router is used in a React Native project w/ Storybook, since it's web-only.
Had the same problem, just with React (I'm not using react-native)
As a workaround, you can add location property on the global window type:
declare module 'storybook-router' {
global {
interface Window {
location: any
}
}
}
it's still an issue...
Hi @SophieDonut, we are going to separate out react native part of storybook to a separate repo, that should make solving issues like these easier in the future. :)
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!
Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!