DefinitelyTyped/types/langmap/langmap-tests.ts
Remco Haszing 2c8e8d096a
🤖 Merge PR #47014 Enhance langmap types by @remcohaszing
- Types are exported in the index, as `types.d.ts` doesn’t map to an existing JavaScript file.
- `esModuleInterop` was removed from `tsconfig.json` for correctness.
- Tests were changed not to use `esModuleInterop` and to use `$ExpectType` annotations.
2020-08-26 15:39:13 -04:00

13 lines
220 B
TypeScript

import * as langmap from 'langmap';
// $ExpectType LanguageMappingList
langmap;
// $ExpectType Language
const value = langmap['en-US'];
// $ExpectType string
value.englishName;
// $ExpectType string
value.nativeName;