Full Typescript Support
See original GitHub issue🚀 Feature Proposal
a loadable component should inheritance props from original component
Motivation
currently when using loadable components types get lost and you lose some advantages of TS
React.lazy currently works with this feature as expected
Example
lets say that OriginalComponent accepts props a and b when doing:
OtherComponent = loadable(() => import('./OriginalComponent'))
OtherComponent should inheritance those props and work with autoComplete or throw errors if there is a missing prop
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
TypeScript: JavaScript With Syntax For Types.
TypeScript extends JavaScript by adding types to the language. TypeScript speeds up your development experience by catching errors and providing fixes ...
Read more >The starting point for learning TypeScript
Find TypeScript starter projects: from Angular to React or Node.js and CLIs.
Read more >Documentation - TypeScript for JavaScript Programmers
To cover these cases, TypeScript supports an extension of the JavaScript language, which offers places for you to tell TypeScript what the types...
Read more >Documentation - TypeScript 3.9
Visual Studio Code supports selecting different versions of TypeScript. ... TypeScript 3.9 adds support to editing scenarios for this configuration.
Read more >Documentation - TypeScript 4.5
TypeScript 4.5 introduces a way to override a specific built-in lib in a manner similar to how @types/ support works. When deciding which...
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
you’re right @theKashey, I never installed types, because the package already have some typescript so the compiler does not ask for it. btw @types/loadable does not exist but
@types/loadable__component
does the trick. probably a good idea to update docs to mention this?.Probably it’s time to autoinstall these missing types.