Typescript definition
See original GitHub issueI tried to add this lib to my Typescript project (with new the JSX transformation), but I get an error in all of my React code:
Could not find a declaration file for module ‘@welldone-software/why-did-you-render/jsx-runtime’
This is my wdyr.ts
file:
/// <reference types="@welldone-software/why-did-you-render" />
import React from 'react';
if (process.env.NODE_ENV === 'development') {
const whyDidYouRender = require('@welldone-software/why-did-you-render');
whyDidYouRender(React, {
trackAllPureComponents: true,
});
}
What is the correct way to add the types?
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
TypeScript: JavaScript With Syntax For Types.
TypeScript is a strongly typed programming language that builds on JavaScript, giving you better tooling at any scale. Try TypeScript Now. Online or...
Read more >TypeScript - Wikipedia
TypeScript is a free and open source programming language developed and maintained by Microsoft. It is a strict syntactical superset of JavaScript and...
Read more >What is TypeScript? Definition, History, Features and Uses
TypeScript is a strongly typed Object-Oriented open source programming language that builds on JavaScript. It is developed and supported by ...
Read more >TypeScript - Overview - Tutorialspoint
By definition, “TypeScript is JavaScript for application-scale development.” TypeScript is a strongly typed, object oriented, compiled language.
Read more >Typescript Definition & Meaning - Merriam-Webster
The meaning of TYPESCRIPT is a typewritten manuscript; especially : one intended for use as printer's copy.
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 are totally right.
I’ve just released version 6.2.1 with the types added in “files”.
Thank you!
seems like there are no types for the transformation indeed. I’ll try adding them asap.