mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 22:30:01 +00:00
[ipify] Add types
This commit is contained in:
8
types/ipify/index.d.ts
vendored
Normal file
8
types/ipify/index.d.ts
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
// Type definitions for ipify 2.0
|
||||
// Project: https://github.com/sindresorhus/ipify#readme
|
||||
// Definitions by: BendingBender <https://github.com/BendingBender>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export = ipify;
|
||||
|
||||
declare function ipify(endpoint?: string): Promise<string>;
|
||||
4
types/ipify/ipify-tests.ts
Normal file
4
types/ipify/ipify-tests.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
import ipify = require('ipify');
|
||||
|
||||
// $ExpectType Promise<string>
|
||||
ipify();
|
||||
23
types/ipify/tsconfig.json
Normal file
23
types/ipify/tsconfig.json
Normal 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",
|
||||
"ipify-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/ipify/tslint.json
Normal file
1
types/ipify/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user