Datetime-picker missing types?

Hey, I am trying to upgrade datetime-picker project from version 8 to 10.4.2. The issue is that I get an error saying:

ERROR in [at-loader] …\node_modules@atlaskit\datetime-picker\dist\types\components\TimePicker.d.ts:143:24
TS2314: Generic type ‘ClearActionMeta’ requires 1 type argument(s).

I am not sure if I am missing any dependencies. Any idea what it could be?

Installed:
@atlaskit/datetime-picker”: “^10.4.2”,
“react-select”: “^4.3.1”,
@types/react-select”: “^4.0.18”

I’m also receiving this tsc error as of version 11.1.7 of @atlaskit/datetime-picker

Hi @BM_50 ,

I am pasting here the relevant parts of the reply that I added to the DEVHELP ticket you created for this issue:

[…] there is indeed an issue with the types we currently use for @atlaskit/select :

Basically, our datetime-picker package import @types/react-select@^4.0.13 and it looks like there was a breaking change to the react-select types in a patch version between 4.0.13 and the latest release, 4.0.18 , which causes this error.

The error only shows up for new installations, as NPM will grab the latest version following the caret syntax ( ^4.0.13 ). That would explain why we didn’t notice this in Atlassian.

We’ll push up a fix on our end […]

In the meantime, as a workaround, you can resolve @types/react-select to version 4.0.13 .

2 Likes

Hello! To add onto what @Dario_B quoted - there were breaking changes released in the third party package for react select types. As a work around for now please pin your version of @types/react-select to 4.0.13 and you’ll be able to get a green build.

If you’re using yarn 1 you can use yarn resolutions for this. If you use NPM@8+ you can use npm overrides.

We have made a patch which will be released in the next release window for @atlaskit/select.

1 Like

One last thing, below is the link to the bug ticket for this issue:

Please vote and watch the above bug ticket so that you will be notified in case of any progress or update.

Cheers,
Dario