Skip to content
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

Still getting type errors on Column #5693

Closed
andreash opened this issue Oct 24, 2022 · 1 comment
Closed

Still getting type errors on Column #5693

andreash opened this issue Oct 24, 2022 · 1 comment

Comments

@andreash
Copy link

andreash commented Oct 24, 2022

Hey, I left a comment regarding the previous fix here. I also forked your sandbox and checked Table2 with Colum - no problems. However, in VSCODE I am still getting

'Column' cannot be used as a JSX component.
  Its instance type 'Column' is not a valid JSX element.
    The types returned by 'render()' are incompatible between these types.
      Type 'ReactNode' is not assignable to type 'false | Element'.
        Type 'string' is not assignable to type 'false | Element'.ts(2786)

on

import { HotkeysProvider } from "@blueprintjs/core";
import { Column, Table2 } from "@blueprintjs/table";
import React from "react";
import ReactDOM from "react-dom";
import "~@blueprintjs/popover2/lib/css/blueprint-popover2.css";
 
ReactDOM.render(
    <HotkeysProvider>
        <Table2 numRows={5}>
            <Column />
            <Column />
            <Column />
        </Table2>
    </HotkeysProvider>,
    document.querySelector("#app"),
);

@types/react version is 18.0.21

Any idea why this happens?

BTW, the "real" compile runs fine and does not generate any errors. It's just within VSCODE that I have this problem. Regarding TS, the only extension installed is TypeScriptHero

@adidahiya
Copy link
Contributor

the "real" compile runs fine and does not generate any errors. It's just within VSCODE that I have this problem.

This sounds like the problem is somewhere in your VSCode configuration. If tsc runs fine compiling with Blueprint types, then our types are likely working correctly. You may want to look for answers in VSCode support channels or Stack Overflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants