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

Interface for ITabProps references "Omit" without defining what "Omit" is #3772

Closed
krinsman opened this issue Oct 8, 2019 · 4 comments
Closed

Comments

@krinsman
Copy link

krinsman commented Oct 8, 2019

Copy-pasted from here: 1e40f6d#r35416453

TypeScript fails to compile for me locally with this change:

node_modules/@blueprintjs/core/lib/esm/components/tabs/tab.d.ts:5:44 - error TS2304: Cannot find name 'Omit'.

5 export interface ITabProps extends IProps, Omit<HTMLDivProps, "id" | "title" | "onClick"> {
                                             ~~~~

error Command failed with exit code 1.

Could you patch this please?

@adidahiya
Copy link
Contributor

Which version of typescript are you using? Omit was added in TS 3.5 https://devblogs.microsoft.com/typescript/announcing-typescript-3-5/#the-omit-helper-type

Sorry I didn't add this to the release notes. We could redefine Omit in the blueprint source so that it compiles with TS <3.5, but at this point, TS 3.5 has been available for 4 months so I think we might just keep it as-is with the reference to the compiler typedef?

@krinsman
Copy link
Author

krinsman commented Oct 9, 2019

Yeah you're right, the package I was trying to build was using an older version of Typescript.

Sorry for the unnecessary noise.

@krinsman krinsman closed this as completed Oct 9, 2019
@adidahiya
Copy link
Contributor

No worries, thanks for pointing it out. I'll add the slight break to the release notes.

@boazrymland
Copy link
Contributor

Stumbled upon this as well.
Unfortunately, the solution to upgrade out typescript was not possible in the environment/project I'm working with.
We had to downgrade @blueprintjs/core and @blueprintjs/select.

I have to note that its pitty that starting to use TS features that require rather big upgrade of TS package in a minor version surprised me. I would expect this to go into a major version update as this break existing setups that have locked or other limitations of typescript version

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

3 participants