diff --git a/types/auto-sni/auto-sni-tests.ts b/types/auto-sni/auto-sni-tests.ts new file mode 100644 index 0000000000..a271a1a1ad --- /dev/null +++ b/types/auto-sni/auto-sni-tests.ts @@ -0,0 +1,6 @@ +import * as autosni from "auto-sni"; +let a = autosni({ + agreeTos: true, + email: '', + domains: [''] +}); diff --git a/types/auto-sni/index.d.ts b/types/auto-sni/index.d.ts new file mode 100644 index 0000000000..075f093f0b --- /dev/null +++ b/types/auto-sni/index.d.ts @@ -0,0 +1,25 @@ +// Type definitions for auto-sni v2.1.1 +// Project: https://www.npmjs.com/package/auto-sni +// Definitions by: Jan Wolf +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import {Server} from "https"; + +declare namespace createServer { + +} + +declare function createServer(opts: { + email: string, + agreeTos: boolean, + domains: Array, + ports?: { + http?: number, + https?: number + }, + debug?: boolean +}, app?: any): Server; + +export = createServer; diff --git a/types/auto-sni/tsconfig.json b/types/auto-sni/tsconfig.json new file mode 100644 index 0000000000..715f315867 --- /dev/null +++ b/types/auto-sni/tsconfig.json @@ -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" + ] +} diff --git a/types/auto-sni/tslint.json b/types/auto-sni/tslint.json new file mode 100644 index 0000000000..d88586e5bd --- /dev/null +++ b/types/auto-sni/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +}