Add Type Definitions for imsi-grok (#36594)

* Add imsi-grok Generated Config

* Add Type Definitions for imsi-grok
This commit is contained in:
Dean Pienaar 2019-07-02 18:40:10 +02:00 committed by Ryan Cavanaugh
parent b8495a257c
commit dd3c25ab8e
4 changed files with 43 additions and 0 deletions

View File

@ -0,0 +1,3 @@
import { grok } from 'imsi-grok';
grok(''); // $ExpectType IMSIBreakdown | null

16
types/imsi-grok/index.d.ts vendored Normal file
View File

@ -0,0 +1,16 @@
// Type definitions for imsi-grok 1.0
// Project: https://github.com/atis--/imsi-grok#readme
// Definitions by: Dean Pienaar <https://github.com/deanpienaar>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// tslint:disable-next-line interface-name
export interface IMSIBreakdown {
mcc: string;
mnc: string;
country_iso: string;
country_name: string;
country_code: string;
network_name: string;
}
export function grok(imsi: string): IMSIBreakdown | null;

View 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",
"imsi-grok-tests.ts"
]
}

View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }