mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Add typings for auto-sni (#16081)
* no message * Added more specific types
This commit is contained in:
parent
b6746d73a2
commit
80729fa6ca
6
types/auto-sni/auto-sni-tests.ts
Normal file
6
types/auto-sni/auto-sni-tests.ts
Normal file
@ -0,0 +1,6 @@
|
||||
import * as autosni from "auto-sni";
|
||||
let a = autosni({
|
||||
agreeTos: true,
|
||||
email: '',
|
||||
domains: ['']
|
||||
});
|
||||
25
types/auto-sni/index.d.ts
vendored
Normal file
25
types/auto-sni/index.d.ts
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
// Type definitions for auto-sni v2.1.1
|
||||
// Project: https://www.npmjs.com/package/auto-sni
|
||||
// Definitions by: Jan Wolf <https://github.com/janwo>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
import {Server} from "https";
|
||||
|
||||
declare namespace createServer {
|
||||
|
||||
}
|
||||
|
||||
declare function createServer(opts: {
|
||||
email: string,
|
||||
agreeTos: boolean,
|
||||
domains: Array<string|string[]>,
|
||||
ports?: {
|
||||
http?: number,
|
||||
https?: number
|
||||
},
|
||||
debug?: boolean
|
||||
}, app?: any): Server;
|
||||
|
||||
export = createServer;
|
||||
22
types/auto-sni/tsconfig.json
Normal file
22
types/auto-sni/tsconfig.json
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"auto-sni-tests.ts"
|
||||
]
|
||||
}
|
||||
3
types/auto-sni/tslint.json
Normal file
3
types/auto-sni/tslint.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json"
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user