We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
TypeScript complains on table.push().
Here is a test code:
import Table from "cli-table3" const table = new Table({ head: ["H1", "H2"] }) table.push(["c1", "c2"]) console.log(table.toString())
Here is an error message:
tsc
src/t0-test.ts:6:1 - error TS2349: 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. 6 table.push(["c1", "c2"]) ~~~~~~~~~~~~~~~~~~~~~~~~
That code possible to compile and run with ts-ignore comment: It will works:
// @ts-ignore table.push(["c1", "c2"])
TypeScript version: 3.1.2 tsconfig.json:
{ "compilerOptions": { "target": "es6", "module": "commonjs", "lib": ["es2017"], "sourceMap": true, "outDir": "./dist", "strict": true, "moduleResolution": "node", "noUnusedLocals": true, "noUnusedParameters": true, "esModuleInterop": true }, "include": ["src/**/*"] }
The text was updated successfully, but these errors were encountered:
can you check if #53 fixes your issue?
otherwise something like this should also resolve your issue for now:
const table = new Table({ head: ["H1", "H2"] }) as HorizontalTable
(I just noticed that #53 removed those type definitions though, but I'm hoping that we can bring them back before releasing another version)
Sorry, something went wrong.
@Turbo87 was this ever fixed?
No branches or pull requests
TypeScript complains on table.push().
Here is a test code:
Here is an error message:
That code possible to compile and run with ts-ignore comment:
It will works:
TypeScript version: 3.1.2
tsconfig.json:
The text was updated successfully, but these errors were encountered: