Extend TypeScript types
See original GitHub issueAnd 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:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Updated types coming to a theatre near you, https://github.com/sindresorhus/refined-github/pull/1783/files#r263985478
Thanks!