Error in 'node_modules/@atlaskit/select/dist/types/PopupSelect/PopupSelect.d.ts'

Getting an error when using PopupSelect:

../../node_modules/@atlaskit/select/dist/types/PopupSelect/PopupSelect.d.ts:53:64 - error TS2314: Generic type 'ActionMeta<OptionType>' requires 1 type argument(s).

53     handleSelectChange: (value: ValueType<Option>, actionMeta: ActionMeta) => void;

Changing line 53 from from

handleSelectChange: (value: ValueType<Option>, actionMeta: ActionMeta) => void;

to

handleSelectChange: (value: ValueType<Option>, actionMeta: ActionMeta<any>) => void;

Fixes the issue. (Adding the generic to ActionMeta). But obviously editing the node_module source isn’t a real solution.

Hi! Thanks for raising this.

I’m trying to replicate your problem, not being successful in Codesandbox https://codesandbox.io/s/nervous-margulis-8bbd5?file=/src/App.tsx

I’ll check this out locally and see if anything changes.

Edit: I do see it erroring however:

I’ll put up a fix for you, easy enough!

Edit again: The rabbit hole deepens.

Looks like our types aren’t latest. I’ll fix it up.

Hi douges, thanks for looking into it! TypeScript CAN be a pain sometimes!

1 Like

This is going to be tricky

image

For now I’d recommend in your tsconfig.json to add skipLibCheck: true to get around this problem. There’s a lot of dependencies which type error unfortunately so this won’t be a quick fix :sweat_smile:

Alright thanks douges, sorry for putting work on your desk!