question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
mseddoncommented, Jan 31, 2017

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

1reaction
pspeter3commented, Mar 30, 2017

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Deal with Optional Things and "Undefined" in TypeScript
First, if you don't tell TypeScript that a property is optional, it will expect it to be set. Adding ? to the property...
Read more >
When to use typescript optional "?" parameter vs explicit ...
Typescript “?” operator means that parameter is optional, it's not necessary to pass it in component/function.
Read more >
How can I make one property non-optional in a typescript type?
I like this approach because you don't need to define a new Generic, but you will still benefit from being able to freely...
Read more >
Documentation - Advanced Types - TypeScript
Optional parameters and properties​​ Type 'undefined' is not assignable to type 'number'.Type 'undefined' is not assignable to type 'number'.
Read more >
optional vs. undefined - TkDodo's blog
Most people I know prefer the first way because it's shorter, and you don't need to invent a name like key - and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found