Add types for geolite2

This commit is contained in:
Florian Keller
2018-12-23 22:56:42 +01:00
parent a1b863c972
commit f487ef9f5b
4 changed files with 39 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
import * as geolite2 from 'geolite2';
const asn = geolite2.paths.asn; // $ExpectType string
const city = geolite2.paths.city; // $ExpectType string
const country = geolite2.paths.country; // $ExpectType string
+10
View File
@@ -0,0 +1,10 @@
// Type definitions for geolite2 1.2
// Project: https://github.com/runk/node-geolite2#readme
// Definitions by: Florian Keller <https://github.com/ffflorian>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export namespace paths {
const asn: string;
const city: string;
const country: string;
}
+23
View File
@@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"geolite2-tests.ts"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }