Out of date docs or incorrect types?
See original GitHub issue🐛 Bug Report
When using typescript there are two issues. Once when using the syntax from the prefetching docs: https://www.smooth-code.com/open-source/loadable-components/docs/prefetching/ and the other when trying to preload.
To Reproduce
// Argument of type '() => string' is not assignable to parameter of type '(props: {}) => Promise<DefaultComponent<{}>>'.
// Type 'string' is not assignable to type 'Promise<DefaultComponent<{}>>'.
export const User = () => loadable(() => './User')
and
export const User = () => loadable(() => import('./User'))
// Property 'preload' does not exist on type '() => ComponentType<{ fallback?: Element | undefined; }>'.
User.preload()
Expected behavior
Typescript should not error and docs should be updated
Details
## System:
- OS: Linux 4.4 Ubuntu 16.04.2 LTS (Xenial Xerus)
- CPU: (16) x64 AMD Ryzen 7 1700X Eight-Core Processor
- Memory: 8.81 GB / 15.95 GB
- Shell: 4.3.46 - /bin/bash
## Binaries:
- Node: 10.15.0 - ~/.nvm/versions/node/v10.15.0/bin/node
- Yarn: 1.9.4 - ~/.yarn/bin/yarn
- npm: 6.4.1 - ~/.nvm/versions/node/v10.15.0/bin/npm
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:8 (4 by maintainers)
Top Results From Across the Web
ISDATE function - Google Docs Editors Help
The ISDATE function returns whether a value is a date. ... Part, Description. value, The value to be verified as a date. ......
Read more >Working with Dates and Times | Google Ads Scripts
Google Ads scripts often need to work with dates and times. Common use cases include retrieving reports for a specific date range, scheduling...
Read more >Date() constructor - JavaScript - MDN Web Docs - Mozilla
You are therefore also advised to make sure the input format is consistent between the two types. Date object. dateObject. An existing Date...
Read more >Data types | BigQuery - Google Cloud
This page provides an overview of all Google Standard SQL for BigQuery data types, including information about their value domains. For information on...
Read more >8.0 Correcting Errors or Missing Information on Form I-9 - USCIS
Draw a line through the incorrect information;; Enter the correct or missing information; and; Initial and date the correction.
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
:working:
@theKashey I guess?