1

I want to pass the intl object to a function. As type I 'm using: any. What is the right type for intl?

function getLabel: (intl: any, optionSelected: string) => string = (intl, optionSelected) => { ... }
    
const intl = useIntl();

getLabel(intl, optionSelected)
vuvu
  • 4,886
  • 12
  • 50
  • 73
  • 1
    What's the return type of useIntl? Use your IDE, or see https://github.com/formatjs/formatjs/blob/de022720f466f9b737a4cad662983c20d195a775/packages/react-intl/src/components/useIntl.ts#L6 – jonrsharpe Jan 11 '21 at 12:24

0 Answers0