Add types for newman

This commit is contained in:
Leonid Logvinov 2018-05-29 16:42:02 -07:00
parent 8091b46536
commit 7aec3d3cdf
No known key found for this signature in database
GPG Key ID: 0DD294BFDE8C95D4
4 changed files with 54 additions and 0 deletions

26
types/newman/index.d.ts vendored Normal file
View File

@ -0,0 +1,26 @@
// Type definitions for newman 3.9
// Project: https://github.com/postmanlabs/newman
// Definitions by: Leonid Logvinov <https://github.com/LogvinovLeon>
// 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;

View File

@ -0,0 +1,11 @@
import {
run,
NewmanRun,
NewmanRunExecution,
NewmanRunExecutionAssertion,
NewmanRunExecutionAssertionError,
NewmanRunExecutionItem,
NewmanRunSummary,
} from 'newman';
run({});

View File

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

1
types/newman/tslint.json Normal file
View File

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