mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
12 lines
280 B
TypeScript
12 lines
280 B
TypeScript
import osLocale = require('os-locale');
|
|
|
|
osLocale().then(locale => {
|
|
const str: string = locale;
|
|
});
|
|
osLocale({spawn: false}).then(locale => {
|
|
const str: string = locale;
|
|
});
|
|
|
|
const locale1: string = osLocale.sync();
|
|
const locale2: string = osLocale.sync({spawn: false});
|