mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
Add types for facebook-locales (#36231)
This commit is contained in:
parent
fe61074c48
commit
d200340ecb
3
types/facebook-locales/facebook-locales-tests.ts
Normal file
3
types/facebook-locales/facebook-locales-tests.ts
Normal file
@ -0,0 +1,3 @@
|
||||
import { bestFacebookLocaleFor } from 'facebook-locales';
|
||||
|
||||
bestFacebookLocaleFor('en_US'); // $ExpectType string
|
||||
18
types/facebook-locales/index.d.ts
vendored
Normal file
18
types/facebook-locales/index.d.ts
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
// Type definitions for facebook-locales 1.0
|
||||
// Project: https://github.com/wix/facebook-locales
|
||||
// Definitions by: Jarek Radosz <https://github.com/CvX>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/**
|
||||
* Maps locales to Facebook locales.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* import { bestFacebookLocaleFor } from 'facebook-locales';
|
||||
*
|
||||
* bestFacebookLocaleFor('en_US'); //-> 'en_US'
|
||||
* bestFacebookLocaleFor('fr_FR'); //-> 'fr_FR'
|
||||
* bestFacebookLocaleFor('es_AR'); //-> 'es_LA'
|
||||
* bestFacebookLocaleFor('ar_EG'); //-> 'ar_AR'
|
||||
*/
|
||||
export function bestFacebookLocaleFor(locale: string): string;
|
||||
23
types/facebook-locales/tsconfig.json
Normal file
23
types/facebook-locales/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"facebook-locales-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/facebook-locales/tslint.json
Normal file
1
types/facebook-locales/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user