Add typings for auto-sni (#16081)

* no message

* Added more specific types
This commit is contained in:
Jan Wolf 2017-04-25 18:48:10 +02:00 committed by Andy
parent b6746d73a2
commit 80729fa6ca
4 changed files with 56 additions and 0 deletions

View 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
View 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;

View 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"
]
}

View File

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