According to index.d.ts, the function getAlpha2Code always returns a string. According to the unit tests, it returns a string on success, undefined otherwise.
The type definition should be changed to read
export function getAlpha2Code(name: string, lang: string): string | undefined;
I suspect that the same is true for most of the functions.
According to index.d.ts, the function
getAlpha2Code
always returns a string. According to the unit tests, it returns a string on success,undefined
otherwise.The type definition should be changed to read
I suspect that the same is true for most of the functions.