Typescript Error: setInterval - Type 'Timer' is not assignable to type 'number'

Ricardo Rocha

I have the following code:

let onSizeChangeSetInterval = setInterval(() => {...}, 30);

When I compile this code, I'm getting the following error:

ERROR in src/components/popover/popover.component.ts(98,17): error TS2322: Type 'Timer' is not assignable to type 'number'. src/modules/forms-ui/formly/types/daterange/picker.daterange.component.ts(186,9): error TS2322: Type 'Timer' is not assignable to type 'number'.

Fran Dioniz

Use window.setInterval instead

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Typescript error 'argument of type is not assignable to parameter of type'

TypeScript error: Type 'void' is not assignable to type 'boolean'

Type 'number' is not assignable to type 'Date' - Typescript not compiling

Typescript: is not assignable to type error

Typescript: Type 'number | null' is not assignable to type 'number'

Typescript error: Type 'undefined[]' is not assignable to type 'void'

Typescript Error Type 'ArrayBuffer' is not assignable to type 'Item[]'

Typescript error: Type Observable<Object> is not assignable to type

Typescript Type 'number' is not assignable │ to type 'string'

TypeScript - Type 'number | undefined' is not assignable to type 'number'

TypeScript : Type 'number' is not assignable to type '0'

Typescript error :: Type 'number' is not assignable to type 'never'

Angular TypeScript error - Type 'number' is not assignable to type 'any[]'

Typescript compiler never Error: Type 'string | number' is not assignable to type 'never'. Type 'string' is not assignable to type 'never'

React Typescript error in TextArea : Type 'string' is not assignable to type number

Typescript error:Type 'number' is not assignable to type 'never'

TypeScript: 'number | undefined' is not assignable to parameter of type 'number'

Typescript Error Argument of type 'string | number' is not assignable to parameter of type 'never'

TypeScript error: Type 'string' is not assignable to type 'number | ""'

typescript Type 'T' is not assignable to type 'number'

Typescript error: Type 'Document[]' is not assignable to custom type

What is the reason for this `Type 'any[]' is not assignable to type '[number]` TypeScript error?

Typescript: Type 'Timer' is not assignable to type 'null'

Type 'Timer' is not assignable to type 'null' in typescript

Argument of type is not assignable to parameter of type Typescript Error

Typescript error: Type 'undefined' is not assignable to type 'string'

Type 'number | undefined' is not assignable to type 'number', typescript error?

typescript error: argument type is not assignable to parameter of type

Typescript - Type '[][]' is not assignable to type '[]' error