Type Timer not assignable to type Number
See original GitHub issueAfter recently starting a new project with Bobril (within the last 30 minutes), I am getting the the above error against this line of code:
After fishing around for a bit, waitingForPopHashChange
is a numeric where setTimeout is a timer. Is this a legit error or something perhaps I messed up when installing the project?
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (7 by maintainers)
Top Results From Across the Web
Typescript Error: setInterval - Type 'Timer' is not assignable to ...
Basically you are trying to cast type number variable to a timer one. could you do instead ? let onSizeChangeSetInterval:NodeJS.
Read more >setInterval - Type 'Timer' is not assignable to type 'number ...
I am attempting to create an interval for a web app. But in the browser, setInterval() returns a number representing the ID of...
Read more >TypeScript incorrect error: Assigned expression type number ...
TypeScript incorrect error: Assigned expression type number is not assignable to type NodeJS.Timer · 1. Setup project with WebStorm and TypeScript · 2....
Read more >Typescript Error: setInterval – Type 'Timer' is not assignable to ...
I have the following code: let onSizeChangeSetInterval = setInterval(() => {...}, 30);. When I compile this code, I'm getting the following error:.
Read more >Microsoft/TypeScript - Gitter
Compiler is still saying : error TS2322: Type 'Timer' is not assignable to type 'number'. Plus you gave me same chunk of code...
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
Typescript compiler when not defined loads automaticaly all
@types
, luckily you can prevent it by adding this section to your package.json:It will define to Typescript compiler that it should load only specified type modules - and you don’t need any.
Reproduced, give me some time to debug …