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.

Extend TypeScript types

See original GitHub issue

And I would recommend typing Function to be more specific.

And the return value should be more explicitly typed (The .destroy()) method.

From https://github.com/bfred-it/delegate-it/commit/a34d85f20fcb28f3485fcd52cd5310b103c446d3

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
nickytonlinecommented, Mar 9, 2019
0reactions
fregantecommented, Mar 10, 2019

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Possible to extend types in Typescript? - Stack Overflow
UPDATE for TypeScript 2.2, it's now possible to have an interface that extends object-like type, if the type satisfies some restrictions:
Read more >
Extending Types in TypeScript The Right Way - Webtips
Extending types in TypeScript can be done by using the & operator. This is called intersection types that can be used for combining...
Read more >
How to extend a Type in TypeScript | bobbyhadz
Use an intersection type to extend a type in TypeScript, e.g. type TypeB = TypeA & {age: number;} . Intersection types are defined...
Read more >
Documentation - Advanced Types - TypeScript
This page lists some of the more advanced ways in which you can model types, it works in tandem with the Utility Types...
Read more >
Extending object-like types with interfaces in TypeScript
Extending multiple interfaces refers to the concept of composition where the interface is designed to extend attributes it needs.
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