How can i fix that type error? TS2339: Property 'DisplayNames' does not exist on type 'typeof Intl'.
my function:
export const getLanguageName = (locale: string | null) => {
const localeName = new Intl.DisplayNames([locale], { type: 'language' });
return localeName.of(locale);
};