Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript definition missing important properties or has properties that should be optional. #133

Closed
mseddon opened this issue Jan 30, 2017 · 7 comments · Fixed by #200
Closed

Comments

@mseddon
Copy link

mseddon commented Jan 30, 2017

Causes huge walls of (invalid) errors in our codebase after upgrading to 2.4.0. I've taken to rm'ing index.d.ts for now :)

The issues are:

  • Router has no history prop.
  • RouterArgs.matches should be optional.
  • RouterArgs.url should be optional.
  • RouterArgs.path should be present.

I think that's all, but don't have time atm to try to fix or dig deeper so there may be others.

@mseddon mseddon changed the title Typescript definition missing important properties. Typescript definition missing important properties or has properties that should be optional. Jan 30, 2017
@developit
Copy link
Member

Yikes! Are you able to do a quick PR to fix those?

@mseddon
Copy link
Author

mseddon commented Jan 30, 2017

not right now :( I can get it at the weekend but atm I am hitting a deadline wall :/

@mseddon
Copy link
Author

mseddon commented Jan 30, 2017

easiest solution would be to remove the typings property from package.json until we have a moment to make it sane again :)

developit added a commit that referenced this issue Jan 30, 2017
@developit
Copy link
Member

patched in 2.4.1.

@mseddon
Copy link
Author

mseddon commented Jan 31, 2017

Nice! Will try and get that cleaned up at the end of the week.

@carmanchris31
Copy link

Any updates on this?

I thought I was losing my mind when my project couldn't find the definition file until I tracked it down to the "x-typings" and then found this issue through the git blame commit hash to disable the typings temporarily. Makes sense now, haha.

@pspeter3
Copy link
Contributor

It would be nice to have the type definitions back. I can try and add them.

pspeter3 added a commit to pspeter3/preact-router that referenced this issue Mar 30, 2017
This addresses the issues in preactjs#133
developit pushed a commit that referenced this issue Apr 17, 2017
This addresses the issues in #133
Alexendoo added a commit to Alexendoo/preact-router that referenced this issue Jun 8, 2017
it appears the issues in preactjs#133 were addressed but the typings file yet restored
Alexendoo added a commit to Alexendoo/preact-router that referenced this issue Jun 8, 2017
Fixes errors present in strict mode

Adds getCurrentUrl and route override definitions

Adds a RoutableProps interface consumers can extend to implement a
routable component

Fixes the types of RouterProps, Route, Link (closes preactjs#133)

Re-enables the typings file in package.json
developit pushed a commit that referenced this issue Jun 13, 2017
* Fix typescript definitions

Fixes errors present in strict mode

Adds getCurrentUrl and route override definitions

Adds a RoutableProps interface consumers can extend to implement a
routable component

Fixes the types of RouterProps, Route, Link (closes #133)

Re-enables the typings file in package.json

* add generic over Route, RouteProps
happydev1237 added a commit to happydev1237/Preact-router-example that referenced this issue Mar 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants