Use with TypeScript
See original GitHub issueIs there currently a way to use this with TypeScript
? I know that there isn’t a @types
package, but I’m wondering if anyone has a declaration file that they’re successfully using. I’m currently getting the error [ts] Property 'addWithJSX' does not exist on type 'Story'.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Documentation - TypeScript for JavaScript Programmers
TypeScript knows the JavaScript language and will generate types for you in many cases. For example in creating a variable and assigning it...
Read more >What is TypeScript and why should you use it? - Contentful
TypeScript extends JavaScript and improves the developer experience. It enables developers to add type safety to their projects. Moreover, ...
Read more >How to Use TypeScript – Beginner-Friendly TS Tutorial
TypeScript is a superset of JavaScript. Superset means that it adds features on top of what JavaScript offers. TypeScript takes all the ...
Read more >Why You Should Use Typescript for Your Next Project
TypeScript is a superset of typed JavaScript (optional) that can help build and manage large-scale JavaScript projects. It can be considered ...
Read more >Node.js with TypeScript
tsc is the TypeScript compiler which will take our TypeScript code and compile it to JavaScript. This command will result in a new...
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
@types has a package now.
npm install @types/storybook-addon-jsx --save-dev
The way to do this locally is by setting up module augmentation: https://www.typescriptlang.org/docs/handbook/declaration-merging.html
Here is the content needed in something like
storybook.d.ts
:Then you can use it like normal without casting to
any