You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While I was working on the issue #28, after updating the code for the new version of cli-table, typescript threw at me the following error for the push method of the Table type.
Cannot invoke an expression whose type lacks a call signature. Type '((...items: Cell[][]) => number) | ((...items: VerticalTableRow[]) => number) | ((...items: CrossTableRow[]) => number)' has no compatible call signatures.
The problem
The method was called with proper signature, but it still throws the error.
The solution
It seems that the "Table" union type definition was created incorrectly, as Typescript prefers to wrap the generics with a single type instead of creating new ones for them.
I created a pull request for the suggested solution #53
The text was updated successfully, but these errors were encountered:
While I was working on the issue #28, after updating the code for the new version of cli-table, typescript threw at me the following error for the push method of the Table type.
Cannot invoke an expression whose type lacks a call signature. Type '((...items: Cell[][]) => number) | ((...items: VerticalTableRow[]) => number) | ((...items: CrossTableRow[]) => number)' has no compatible call signatures.
The problem
The method was called with proper signature, but it still throws the error.
The solution
It seems that the "Table" union type definition was created incorrectly, as Typescript prefers to wrap the generics with a single type instead of creating new ones for them.
I created a pull request for the suggested solution #53
The text was updated successfully, but these errors were encountered: