-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. #2624
Comments
Can you declare the return type of |
I don't get the error with |
The short version is that you should always be returning In TypeScript, we have several primitive types like From the TypeScript spec:
|
Ah, thanks. Misread the headings under "Basic Types" (which are capitalized) as the correct way to do things. Now seeing the code examples are lowercase. |
I also get the same issue here. |
I have the following code:
The signature of
ecb.determineBlockSize
isdetermineBlockSize (): Number {
However, I get an error on the
console.log
telling me that:The return type is
Number
, thetypeof
revealsnumber
, yet I still get this error.The text was updated successfully, but these errors were encountered: