Type information missing for "loaders"
See original GitHub issueDescribe the bug There is no TypeScript type information for any of the loaders feature.
In particular, there is no loaders
property on Story
/BaseStory
.
To Reproduce
export const Default = Template.bind({});
Default.loaders = createLoaders();
TS2339: Property ‘loaders’ does not exist on type 'Story '.
System
System:
OS: Windows 10 10.0.18363
CPU: (8) x64 Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz
Binaries:
Node: 14.15.3 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.10 - ~\AppData\Roaming\npm\yarn.CMD
npm: 6.14.9 - C:\Program Files\nodejs\npm.CMD
Browsers:
Chrome: 91.0.4472.106
Edge: Spartan (44.18362.1593.0)
npmPackages:
@storybook/addon-actions: ^6.3.0 => 6.3.0
@storybook/addon-essentials: ^6.3.0 => 6.3.0
@storybook/addon-links: ^6.3.0 => 6.3.0
@storybook/html: ^6.3.0 => 6.3.0
Issue Analytics
- State:
- Created 2 years ago
- Reactions:5
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Missing loaders in custom npm package - Stack Overflow
I had this problem recently and resolved it by updating my webpack config to check whether the package in question is symlinked locally....
Read more >"Mandatory field is missing" in SIS version 2 (more technical ...
When loading student information files there are errors such as: "Mandatory field is missing: email type." This occurs when testing version ...
Read more >Common error messages in Data Loader - Salesforce Help
Here's a list of common Data Loader errors you'll receive as you use Data ... Note: Some Ids such as record types or...
Read more >Object Manager Loader errors encountered when ... - IBM
Cause. Error messages that should be in the ERROR_MESSAGES table are missing when processing international strings. These DB2 specific messages ...
Read more >Error for Worker.dat "The corresponding date effective record ...
Fusion HCM Data Loader: Error for Worker.dat "The corresponding date ... is missing for the {CHILDNAME} (PER-1531696)" (Doc ID 2149175.1).
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 Free
Top 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
A workaround, based on Storybook example:
Type assertion (
as
) is fine in this case.What you can do further is to create a type alias, so it will save you some typing:
so you can use the same
Story
type in each of your story in the file.