score:1

you can import cssproperties interface from 'react' and cast the return value as cssproperties of your control key:

import react, { cssproperties } from 'react'

const inputstyle = {
  control: () => ({
    width: 200,
  } as cssproperties),
}

it is because control is stylefn type which is:

type stylefn = (base: cssproperties, state: any) => cssproperties;

score:1

i believe you have a typo: the style prop for select should be styles (the plural).

the style (singular) property normally is supposed to be of type cssproperties. but styles (plural) is an object with function values that return cssproperties. so typescript is helping you out there, albeit somewhat cryptically.


Related Query

More Query from same tag