diff --git a/types/newman/index.d.ts b/types/newman/index.d.ts new file mode 100644 index 0000000000..8f566b275c --- /dev/null +++ b/types/newman/index.d.ts @@ -0,0 +1,26 @@ +// Type definitions for newman 3.9 +// Project: https://github.com/postmanlabs/newman +// Definitions by: Leonid Logvinov +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export interface NewmanRunSummary { + run: NewmanRun; +} +export interface NewmanRun { + executions: NewmanRunExecution[]; +} +export interface NewmanRunExecution { + item: NewmanRunExecutionItem; + assertions: NewmanRunExecutionAssertion[]; +} +export interface NewmanRunExecutionItem { + name: string; +} +export interface NewmanRunExecutionAssertion { + assertion: string; + error: NewmanRunExecutionAssertionError; +} +export interface NewmanRunExecutionAssertionError { + message: string; +} +export function run(options: any, callback?: (err: Error | null, summary: NewmanRunSummary) => void): void; diff --git a/types/newman/newman-tests.ts b/types/newman/newman-tests.ts new file mode 100644 index 0000000000..82ba6002e7 --- /dev/null +++ b/types/newman/newman-tests.ts @@ -0,0 +1,11 @@ +import { + run, + NewmanRun, + NewmanRunExecution, + NewmanRunExecutionAssertion, + NewmanRunExecutionAssertionError, + NewmanRunExecutionItem, + NewmanRunSummary, +} from 'newman'; + +run({}); diff --git a/types/newman/tsconfig.json b/types/newman/tsconfig.json new file mode 100644 index 0000000000..a4fcd1bf48 --- /dev/null +++ b/types/newman/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": ["index.d.ts", "newman-tests.ts"] +} diff --git a/types/newman/tslint.json b/types/newman/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/newman/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }