mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-29 03:53:43 +03:00
parent
c7e1c14ce7
commit
3aa586cced
|
@ -47,6 +47,7 @@ gulp.task('copyDebug', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('tsc', function() {
|
gulp.task('tsc', function() {
|
||||||
|
exec('tsc -v');
|
||||||
exec('tsc -p ./tsconfig.json');
|
exec('tsc -p ./tsconfig.json');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
22
demo/index-test.html
Normal file
22
demo/index-test.html
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>ReDoc</title>
|
||||||
|
<!-- needed for adaptive design -->
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
ReDoc doesn't change outer page styles
|
||||||
|
-->
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<redoc spec-url='swagger.json'></redoc>
|
||||||
|
<script src="https://rebilly.github.io/ReDoc/releases/latest/redoc.min.js"> </script>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -25,7 +25,7 @@
|
||||||
<redoc scroll-y-offset="body > nav" spec-url='swagger.yaml'></redoc>
|
<redoc scroll-y-offset="body > nav" spec-url='swagger.yaml'></redoc>
|
||||||
|
|
||||||
<script src="main.js"> </script>
|
<script src="main.js"> </script>
|
||||||
<script src="./dist/redoc.min.js"> </script>
|
<script src="https://rebilly.github.io/ReDoc/releases/latest/redoc.min.js"> </script>
|
||||||
<script>
|
<script>
|
||||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||||
|
|
|
@ -9,7 +9,7 @@ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||||
import { enableProdMode } from '@angular/core';
|
import { enableProdMode } from '@angular/core';
|
||||||
import { RedocModule } from './redoc.module';
|
import { RedocModule } from './redoc.module';
|
||||||
import { Redoc } from './components/index';
|
import { Redoc } from './components/index';
|
||||||
import { optionsService } from './redoc.module';
|
//import { getOptions } from './redoc.module';
|
||||||
import { SpecManager } from './utils/SpecManager';
|
import { SpecManager } from './utils/SpecManager';
|
||||||
import { BrowserDomAdapter } from '@angular/platform-browser/src/browser/browser_adapter';
|
import { BrowserDomAdapter } from '@angular/platform-browser/src/browser/browser_adapter';
|
||||||
|
|
||||||
|
@ -18,16 +18,16 @@ var dom = new BrowserDomAdapter();
|
||||||
//Redoc.version = redocVersion;
|
//Redoc.version = redocVersion;
|
||||||
var moduleRef;
|
var moduleRef;
|
||||||
export function init(specUrl:string, options?) {
|
export function init(specUrl:string, options?) {
|
||||||
if (!optionsService.options.debugMode) {
|
// if (!optionsService.options.debugMode) {
|
||||||
enableProdMode();
|
// enableProdMode();
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
if (moduleRef) {
|
// if (moduleRef) {
|
||||||
destroy();
|
// destroy();
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
optionsService.options = options;
|
// optionsService.options = options;
|
||||||
optionsService.options.specUrl = optionsService.options.specUrl || specUrl;
|
// optionsService.options.specUrl = optionsService.options.specUrl || specUrl;
|
||||||
|
|
||||||
Redoc.showLoadingAnimation();
|
Redoc.showLoadingAnimation();
|
||||||
return SpecManager.instance().load(specUrl)
|
return SpecManager.instance().load(specUrl)
|
|
@ -10,8 +10,6 @@ import { OptionsService, RedocEventsService, MenuService,
|
||||||
ScrollService, Hash, WarningsService } from './services/index';
|
ScrollService, Hash, WarningsService } from './services/index';
|
||||||
import { SpecManager } from './utils/SpecManager';
|
import { SpecManager } from './utils/SpecManager';
|
||||||
|
|
||||||
export const optionsService = new OptionsService(new BrowserDomAdapter());
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [ BrowserModule ],
|
imports: [ BrowserModule ],
|
||||||
declarations: [ REDOC_DIRECTIVES, REDOC_COMMON_DIRECTIVES, REDOC_PIPES],
|
declarations: [ REDOC_DIRECTIVES, REDOC_COMMON_DIRECTIVES, REDOC_PIPES],
|
||||||
|
@ -24,8 +22,8 @@ export const optionsService = new OptionsService(new BrowserDomAdapter());
|
||||||
Hash,
|
Hash,
|
||||||
MenuService,
|
MenuService,
|
||||||
WarningsService,
|
WarningsService,
|
||||||
provide(OptionsService, {useValue: optionsService})
|
OptionsService
|
||||||
],
|
]
|
||||||
})
|
})
|
||||||
export class RedocModule {
|
export class RedocModule {
|
||||||
}
|
}
|
||||||
|
|
13
manual-types/index.d.ts
vendored
Normal file
13
manual-types/index.d.ts
vendored
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
declare module "dropkickjs"
|
||||||
|
declare module "json-schema-ref-parser"
|
||||||
|
declare module "openapi-sampler"
|
||||||
|
declare module "remarkable"
|
||||||
|
declare module "scrollparent"
|
||||||
|
declare module "slugify"
|
||||||
|
declare module "url"
|
||||||
|
declare module "json-pointer";
|
||||||
|
|
||||||
|
declare module "*!css" {
|
||||||
|
const content: string;
|
||||||
|
export default content;
|
||||||
|
}
|
12
package.json
12
package.json
|
@ -15,7 +15,8 @@
|
||||||
"branch-release": "git reset --hard && branch-release",
|
"branch-release": "git reset --hard && branch-release",
|
||||||
"unit": "gulp test",
|
"unit": "gulp test",
|
||||||
"e2e": "gulp e2e --prod",
|
"e2e": "gulp e2e --prod",
|
||||||
"deploy": "node ./build/prepare_deploy.js && deploy-to-gh-pages --update demo"
|
"deploy": "node ./build/prepare_deploy.js && deploy-to-gh-pages --update demo",
|
||||||
|
"ngc": "ngc -p . && copy lib/* .compiled/lib"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"OpenAPI",
|
"OpenAPI",
|
||||||
|
@ -80,9 +81,14 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@angular/common": "^2.0.0-rc.5",
|
"@angular/common": "^2.0.0-rc.5",
|
||||||
"@angular/compiler": "^2.0.0-rc.5",
|
"@angular/compiler": "^2.0.0-rc.5",
|
||||||
|
"@angular/compiler-cli": "^0.5.0",
|
||||||
"@angular/core": "^2.0.0-rc.5",
|
"@angular/core": "^2.0.0-rc.5",
|
||||||
"@angular/platform-browser": "^2.0.0-rc.5",
|
"@angular/platform-browser": "^2.0.0-rc.5",
|
||||||
"@angular/platform-browser-dynamic": "^2.0.0-rc.5",
|
"@angular/platform-browser-dynamic": "^2.0.0-rc.5",
|
||||||
|
"@angular/platform-server": "^2.0.0-rc.5",
|
||||||
|
"@types/core-js": "^0.9.31",
|
||||||
|
"@types/jasmine": "^2.2.32",
|
||||||
|
"@types/should": "^8.1.28",
|
||||||
"babel-polyfill": "^6.3.14",
|
"babel-polyfill": "^6.3.14",
|
||||||
"branch-release": "^1.0.3",
|
"branch-release": "^1.0.3",
|
||||||
"browser-sync": "^2.10.1",
|
"browser-sync": "^2.10.1",
|
||||||
|
@ -135,9 +141,9 @@
|
||||||
"sinon": "^1.17.2",
|
"sinon": "^1.17.2",
|
||||||
"slugify": "^0.1.1",
|
"slugify": "^0.1.1",
|
||||||
"systemjs-builder": "0.15.16",
|
"systemjs-builder": "0.15.16",
|
||||||
"tslint": "^3.13.0",
|
"tslint": "^3.14.0",
|
||||||
"tslint-stylish": "^2.1.0-beta",
|
"tslint-stylish": "^2.1.0-beta",
|
||||||
"typescript": "^1.8.10",
|
"typescript": "^2.0.0",
|
||||||
"vinyl-paths": "^2.0.0",
|
"vinyl-paths": "^2.0.0",
|
||||||
"yargs": "^4.7.1",
|
"yargs": "^4.7.1",
|
||||||
"zone.js": "^0.6.15"
|
"zone.js": "^0.6.15"
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
<script>
|
<script>
|
||||||
window.redocError = null;
|
window.redocError = null;
|
||||||
/* init redoc */
|
/* init redoc */
|
||||||
|
window.redocDebugMode = true;
|
||||||
var url = window.location.search.substr(5) || 'http://rebilly.github.io/SwaggerTemplateRepo/swagger.json';
|
var url = window.location.search.substr(5) || 'http://rebilly.github.io/SwaggerTemplateRepo/swagger.json';
|
||||||
Redoc.init(decodeURIComponent(url), {disableLazySchemas: true}).then(function() {}, function(err) {
|
Redoc.init(decodeURIComponent(url), {disableLazySchemas: true}).then(function() {}, function(err) {
|
||||||
window.redocError = err;
|
window.redocError = err;
|
||||||
|
|
|
@ -114,7 +114,7 @@ describe('Utils', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('getMethodParams method', () => {
|
describe('getMethodParams method', () => {
|
||||||
beforeAll((done) => {
|
beforeAll((done:any) => {
|
||||||
specMgr.load('/tests/schemas/schema-mgr-methodparams.json').then(() => {
|
specMgr.load('/tests/schemas/schema-mgr-methodparams.json').then(() => {
|
||||||
done();
|
done();
|
||||||
}, () => {
|
}, () => {
|
||||||
|
@ -163,7 +163,7 @@ describe('Utils', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('findDerivedDefinitions method', () => {
|
describe('findDerivedDefinitions method', () => {
|
||||||
beforeAll((done) => {
|
beforeAll((done:any) => {
|
||||||
specMgr.load('/tests/schemas/extended-petstore.yml').then(() => {
|
specMgr.load('/tests/schemas/extended-petstore.yml').then(() => {
|
||||||
done();
|
done();
|
||||||
}, () => {
|
}, () => {
|
||||||
|
|
|
@ -3,11 +3,17 @@
|
||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
"emitDecoratorMetadata": true,
|
"emitDecoratorMetadata": true,
|
||||||
"module": "es6",
|
"module": "es6",
|
||||||
"target": "es6",
|
"target": "es5",
|
||||||
"noImplicitAny": false,
|
"noImplicitAny": false,
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"outDir": ".tmp/",
|
"outDir": ".tmp/",
|
||||||
"moduleResolution": "node"
|
"pretty": true,
|
||||||
|
"moduleResolution": "node",
|
||||||
|
"types": [
|
||||||
|
"core-js",
|
||||||
|
"jasmine",
|
||||||
|
"should"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"node_modules",
|
"node_modules",
|
||||||
|
|
12
typings.json
12
typings.json
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
"globalDevDependencies": {
|
|
||||||
"jasmine": "registry:dt/jasmine#2.2.0+20160505161446"
|
|
||||||
},
|
|
||||||
"globalDependencies": {
|
|
||||||
"marked": "registry:dt/marked#0.0.0+20160325085301",
|
|
||||||
"should": "registry:dt/should#8.1.1+20160521152556"
|
|
||||||
},
|
|
||||||
"ambientDevDependencies": {
|
|
||||||
"es6-shim": "github:DefinitelyTyped/DefinitelyTyped/es6-shim/es6-shim.d.ts#6697d6f7dadbf5773cb40ecda35a76027e0783b2"
|
|
||||||
}
|
|
||||||
}
|
|
4
typings/dropkickjs.d.ts
vendored
4
typings/dropkickjs.d.ts
vendored
|
@ -1,4 +0,0 @@
|
||||||
declare module "dropkickjs" {
|
|
||||||
var x: any;
|
|
||||||
export default x;
|
|
||||||
}
|
|
501
typings/globals/jasmine/index.d.ts
vendored
501
typings/globals/jasmine/index.d.ts
vendored
|
@ -1,501 +0,0 @@
|
||||||
// Generated by typings
|
|
||||||
// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/36a1be34dbe202c665b3ddafd50824f78c09eea3/jasmine/jasmine.d.ts
|
|
||||||
declare function describe(description: string, specDefinitions: () => void): void;
|
|
||||||
declare function fdescribe(description: string, specDefinitions: () => void): void;
|
|
||||||
declare function xdescribe(description: string, specDefinitions: () => void): void;
|
|
||||||
|
|
||||||
declare function it(expectation: string, assertion?: () => void, timeout?: number): void;
|
|
||||||
declare function it(expectation: string, assertion?: (done: DoneFn) => void, timeout?: number): void;
|
|
||||||
declare function fit(expectation: string, assertion?: () => void, timeout?: number): void;
|
|
||||||
declare function fit(expectation: string, assertion?: (done: DoneFn) => void, timeout?: number): void;
|
|
||||||
declare function xit(expectation: string, assertion?: () => void, timeout?: number): void;
|
|
||||||
declare function xit(expectation: string, assertion?: (done: DoneFn) => void, timeout?: number): void;
|
|
||||||
|
|
||||||
/** If you call the function pending anywhere in the spec body, no matter the expectations, the spec will be marked pending. */
|
|
||||||
declare function pending(reason?: string): void;
|
|
||||||
|
|
||||||
declare function beforeEach(action: () => void, timeout?: number): void;
|
|
||||||
declare function beforeEach(action: (done: DoneFn) => void, timeout?: number): void;
|
|
||||||
declare function afterEach(action: () => void, timeout?: number): void;
|
|
||||||
declare function afterEach(action: (done: DoneFn) => void, timeout?: number): void;
|
|
||||||
|
|
||||||
declare function beforeAll(action: () => void, timeout?: number): void;
|
|
||||||
declare function beforeAll(action: (done: DoneFn) => void, timeout?: number): void;
|
|
||||||
declare function afterAll(action: () => void, timeout?: number): void;
|
|
||||||
declare function afterAll(action: (done: DoneFn) => void, timeout?: number): void;
|
|
||||||
|
|
||||||
declare function expect(spy: Function): jasmine.Matchers;
|
|
||||||
declare function expect(actual: any): jasmine.Matchers;
|
|
||||||
|
|
||||||
declare function fail(e?: any): void;
|
|
||||||
/** Action method that should be called when the async work is complete */
|
|
||||||
interface DoneFn extends Function {
|
|
||||||
(): void;
|
|
||||||
|
|
||||||
/** fails the spec and indicates that it has completed. If the message is an Error, Error.message is used */
|
|
||||||
fail: (message?: Error|string) => void;
|
|
||||||
}
|
|
||||||
|
|
||||||
declare function spyOn(object: any, method: string): jasmine.Spy;
|
|
||||||
|
|
||||||
declare function runs(asyncMethod: Function): void;
|
|
||||||
declare function waitsFor(latchMethod: () => boolean, failureMessage?: string, timeout?: number): void;
|
|
||||||
declare function waits(timeout?: number): void;
|
|
||||||
|
|
||||||
declare namespace jasmine {
|
|
||||||
|
|
||||||
var clock: () => Clock;
|
|
||||||
|
|
||||||
function any(aclass: any): Any;
|
|
||||||
function anything(): Any;
|
|
||||||
function arrayContaining(sample: any[]): ArrayContaining;
|
|
||||||
function objectContaining(sample: any): ObjectContaining;
|
|
||||||
function createSpy(name: string, originalFn?: Function): Spy;
|
|
||||||
function createSpyObj(baseName: string, methodNames: any[]): any;
|
|
||||||
function createSpyObj<T>(baseName: string, methodNames: any[]): T;
|
|
||||||
function pp(value: any): string;
|
|
||||||
function getEnv(): Env;
|
|
||||||
function addCustomEqualityTester(equalityTester: CustomEqualityTester): void;
|
|
||||||
function addMatchers(matchers: CustomMatcherFactories): void;
|
|
||||||
function stringMatching(str: string): Any;
|
|
||||||
function stringMatching(str: RegExp): Any;
|
|
||||||
|
|
||||||
interface Any {
|
|
||||||
|
|
||||||
new (expectedClass: any): any;
|
|
||||||
|
|
||||||
jasmineMatches(other: any): boolean;
|
|
||||||
jasmineToString(): string;
|
|
||||||
}
|
|
||||||
|
|
||||||
// taken from TypeScript lib.core.es6.d.ts, applicable to CustomMatchers.contains()
|
|
||||||
interface ArrayLike<T> {
|
|
||||||
length: number;
|
|
||||||
[n: number]: T;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface ArrayContaining {
|
|
||||||
new (sample: any[]): any;
|
|
||||||
|
|
||||||
asymmetricMatch(other: any): boolean;
|
|
||||||
jasmineToString(): string;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface ObjectContaining {
|
|
||||||
new (sample: any): any;
|
|
||||||
|
|
||||||
jasmineMatches(other: any, mismatchKeys: any[], mismatchValues: any[]): boolean;
|
|
||||||
jasmineToString(): string;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Block {
|
|
||||||
|
|
||||||
new (env: Env, func: SpecFunction, spec: Spec): any;
|
|
||||||
|
|
||||||
execute(onComplete: () => void): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface WaitsBlock extends Block {
|
|
||||||
new (env: Env, timeout: number, spec: Spec): any;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface WaitsForBlock extends Block {
|
|
||||||
new (env: Env, timeout: number, latchFunction: SpecFunction, message: string, spec: Spec): any;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Clock {
|
|
||||||
install(): void;
|
|
||||||
uninstall(): void;
|
|
||||||
/** Calls to any registered callback are triggered when the clock is ticked forward via the jasmine.clock().tick function, which takes a number of milliseconds. */
|
|
||||||
tick(ms: number): void;
|
|
||||||
mockDate(date?: Date): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface CustomEqualityTester {
|
|
||||||
(first: any, second: any): boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface CustomMatcher {
|
|
||||||
compare<T>(actual: T, expected: T): CustomMatcherResult;
|
|
||||||
compare(actual: any, expected: any): CustomMatcherResult;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface CustomMatcherFactory {
|
|
||||||
(util: MatchersUtil, customEqualityTesters: Array<CustomEqualityTester>): CustomMatcher;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface CustomMatcherFactories {
|
|
||||||
[index: string]: CustomMatcherFactory;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface CustomMatcherResult {
|
|
||||||
pass: boolean;
|
|
||||||
message?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface MatchersUtil {
|
|
||||||
equals(a: any, b: any, customTesters?: Array<CustomEqualityTester>): boolean;
|
|
||||||
contains<T>(haystack: ArrayLike<T> | string, needle: any, customTesters?: Array<CustomEqualityTester>): boolean;
|
|
||||||
buildFailureMessage(matcherName: string, isNot: boolean, actual: any, ...expected: Array<any>): string;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Env {
|
|
||||||
setTimeout: any;
|
|
||||||
clearTimeout: void;
|
|
||||||
setInterval: any;
|
|
||||||
clearInterval: void;
|
|
||||||
updateInterval: number;
|
|
||||||
|
|
||||||
currentSpec: Spec;
|
|
||||||
|
|
||||||
matchersClass: Matchers;
|
|
||||||
|
|
||||||
version(): any;
|
|
||||||
versionString(): string;
|
|
||||||
nextSpecId(): number;
|
|
||||||
addReporter(reporter: Reporter): void;
|
|
||||||
execute(): void;
|
|
||||||
describe(description: string, specDefinitions: () => void): Suite;
|
|
||||||
// ddescribe(description: string, specDefinitions: () => void): Suite; Not a part of jasmine. Angular team adds these
|
|
||||||
beforeEach(beforeEachFunction: () => void): void;
|
|
||||||
beforeAll(beforeAllFunction: () => void): void;
|
|
||||||
currentRunner(): Runner;
|
|
||||||
afterEach(afterEachFunction: () => void): void;
|
|
||||||
afterAll(afterAllFunction: () => void): void;
|
|
||||||
xdescribe(desc: string, specDefinitions: () => void): XSuite;
|
|
||||||
it(description: string, func: () => void): Spec;
|
|
||||||
// iit(description: string, func: () => void): Spec; Not a part of jasmine. Angular team adds these
|
|
||||||
xit(desc: string, func: () => void): XSpec;
|
|
||||||
compareRegExps_(a: RegExp, b: RegExp, mismatchKeys: string[], mismatchValues: string[]): boolean;
|
|
||||||
compareObjects_(a: any, b: any, mismatchKeys: string[], mismatchValues: string[]): boolean;
|
|
||||||
equals_(a: any, b: any, mismatchKeys: string[], mismatchValues: string[]): boolean;
|
|
||||||
contains_(haystack: any, needle: any): boolean;
|
|
||||||
addCustomEqualityTester(equalityTester: CustomEqualityTester): void;
|
|
||||||
addMatchers(matchers: CustomMatcherFactories): void;
|
|
||||||
specFilter(spec: Spec): boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface FakeTimer {
|
|
||||||
|
|
||||||
new (): any;
|
|
||||||
|
|
||||||
reset(): void;
|
|
||||||
tick(millis: number): void;
|
|
||||||
runFunctionsWithinRange(oldMillis: number, nowMillis: number): void;
|
|
||||||
scheduleFunction(timeoutKey: any, funcToCall: () => void, millis: number, recurring: boolean): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface HtmlReporter {
|
|
||||||
new (): any;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface HtmlSpecFilter {
|
|
||||||
new (): any;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Result {
|
|
||||||
type: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface NestedResults extends Result {
|
|
||||||
description: string;
|
|
||||||
|
|
||||||
totalCount: number;
|
|
||||||
passedCount: number;
|
|
||||||
failedCount: number;
|
|
||||||
|
|
||||||
skipped: boolean;
|
|
||||||
|
|
||||||
rollupCounts(result: NestedResults): void;
|
|
||||||
log(values: any): void;
|
|
||||||
getItems(): Result[];
|
|
||||||
addResult(result: Result): void;
|
|
||||||
passed(): boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface MessageResult extends Result {
|
|
||||||
values: any;
|
|
||||||
trace: Trace;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface ExpectationResult extends Result {
|
|
||||||
matcherName: string;
|
|
||||||
passed(): boolean;
|
|
||||||
expected: any;
|
|
||||||
actual: any;
|
|
||||||
message: string;
|
|
||||||
trace: Trace;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Trace {
|
|
||||||
name: string;
|
|
||||||
message: string;
|
|
||||||
stack: any;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface PrettyPrinter {
|
|
||||||
|
|
||||||
new (): any;
|
|
||||||
|
|
||||||
format(value: any): void;
|
|
||||||
iterateObject(obj: any, fn: (property: string, isGetter: boolean) => void): void;
|
|
||||||
emitScalar(value: any): void;
|
|
||||||
emitString(value: string): void;
|
|
||||||
emitArray(array: any[]): void;
|
|
||||||
emitObject(obj: any): void;
|
|
||||||
append(value: any): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface StringPrettyPrinter extends PrettyPrinter {
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Queue {
|
|
||||||
|
|
||||||
new (env: any): any;
|
|
||||||
|
|
||||||
env: Env;
|
|
||||||
ensured: boolean[];
|
|
||||||
blocks: Block[];
|
|
||||||
running: boolean;
|
|
||||||
index: number;
|
|
||||||
offset: number;
|
|
||||||
abort: boolean;
|
|
||||||
|
|
||||||
addBefore(block: Block, ensure?: boolean): void;
|
|
||||||
add(block: any, ensure?: boolean): void;
|
|
||||||
insertNext(block: any, ensure?: boolean): void;
|
|
||||||
start(onComplete?: () => void): void;
|
|
||||||
isRunning(): boolean;
|
|
||||||
next_(): void;
|
|
||||||
results(): NestedResults;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Matchers {
|
|
||||||
|
|
||||||
new (env: Env, actual: any, spec: Env, isNot?: boolean): any;
|
|
||||||
|
|
||||||
env: Env;
|
|
||||||
actual: any;
|
|
||||||
spec: Env;
|
|
||||||
isNot?: boolean;
|
|
||||||
message(): any;
|
|
||||||
|
|
||||||
toBe(expected: any, expectationFailOutput?: any): boolean;
|
|
||||||
toEqual(expected: any, expectationFailOutput?: any): boolean;
|
|
||||||
toMatch(expected: string | RegExp, expectationFailOutput?: any): boolean;
|
|
||||||
toBeDefined(expectationFailOutput?: any): boolean;
|
|
||||||
toBeUndefined(expectationFailOutput?: any): boolean;
|
|
||||||
toBeNull(expectationFailOutput?: any): boolean;
|
|
||||||
toBeNaN(): boolean;
|
|
||||||
toBeTruthy(expectationFailOutput?: any): boolean;
|
|
||||||
toBeFalsy(expectationFailOutput?: any): boolean;
|
|
||||||
toHaveBeenCalled(): boolean;
|
|
||||||
toHaveBeenCalledWith(...params: any[]): boolean;
|
|
||||||
toHaveBeenCalledTimes(expected: number): boolean;
|
|
||||||
toContain(expected: any, expectationFailOutput?: any): boolean;
|
|
||||||
toBeLessThan(expected: number, expectationFailOutput?: any): boolean;
|
|
||||||
toBeGreaterThan(expected: number, expectationFailOutput?: any): boolean;
|
|
||||||
toBeCloseTo(expected: number, precision: any, expectationFailOutput?: any): boolean;
|
|
||||||
toThrow(expected?: any): boolean;
|
|
||||||
toThrowError(message?: string | RegExp): boolean;
|
|
||||||
toThrowError(expected?: new (...args: any[]) => Error, message?: string | RegExp): boolean;
|
|
||||||
not: Matchers;
|
|
||||||
|
|
||||||
Any: Any;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Reporter {
|
|
||||||
reportRunnerStarting(runner: Runner): void;
|
|
||||||
reportRunnerResults(runner: Runner): void;
|
|
||||||
reportSuiteResults(suite: Suite): void;
|
|
||||||
reportSpecStarting(spec: Spec): void;
|
|
||||||
reportSpecResults(spec: Spec): void;
|
|
||||||
log(str: string): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface MultiReporter extends Reporter {
|
|
||||||
addReporter(reporter: Reporter): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Runner {
|
|
||||||
|
|
||||||
new (env: Env): any;
|
|
||||||
|
|
||||||
execute(): void;
|
|
||||||
beforeEach(beforeEachFunction: SpecFunction): void;
|
|
||||||
afterEach(afterEachFunction: SpecFunction): void;
|
|
||||||
beforeAll(beforeAllFunction: SpecFunction): void;
|
|
||||||
afterAll(afterAllFunction: SpecFunction): void;
|
|
||||||
finishCallback(): void;
|
|
||||||
addSuite(suite: Suite): void;
|
|
||||||
add(block: Block): void;
|
|
||||||
specs(): Spec[];
|
|
||||||
suites(): Suite[];
|
|
||||||
topLevelSuites(): Suite[];
|
|
||||||
results(): NestedResults;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface SpecFunction {
|
|
||||||
(spec?: Spec): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface SuiteOrSpec {
|
|
||||||
id: number;
|
|
||||||
env: Env;
|
|
||||||
description: string;
|
|
||||||
queue: Queue;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Spec extends SuiteOrSpec {
|
|
||||||
|
|
||||||
new (env: Env, suite: Suite, description: string): any;
|
|
||||||
|
|
||||||
suite: Suite;
|
|
||||||
|
|
||||||
afterCallbacks: SpecFunction[];
|
|
||||||
spies_: Spy[];
|
|
||||||
|
|
||||||
results_: NestedResults;
|
|
||||||
matchersClass: Matchers;
|
|
||||||
|
|
||||||
getFullName(): string;
|
|
||||||
results(): NestedResults;
|
|
||||||
log(arguments: any): any;
|
|
||||||
runs(func: SpecFunction): Spec;
|
|
||||||
addToQueue(block: Block): void;
|
|
||||||
addMatcherResult(result: Result): void;
|
|
||||||
expect(actual: any): any;
|
|
||||||
waits(timeout: number): Spec;
|
|
||||||
waitsFor(latchFunction: SpecFunction, timeoutMessage?: string, timeout?: number): Spec;
|
|
||||||
fail(e?: any): void;
|
|
||||||
getMatchersClass_(): Matchers;
|
|
||||||
addMatchers(matchersPrototype: CustomMatcherFactories): void;
|
|
||||||
finishCallback(): void;
|
|
||||||
finish(onComplete?: () => void): void;
|
|
||||||
after(doAfter: SpecFunction): void;
|
|
||||||
execute(onComplete?: () => void): any;
|
|
||||||
addBeforesAndAftersToQueue(): void;
|
|
||||||
explodes(): void;
|
|
||||||
spyOn(obj: any, methodName: string, ignoreMethodDoesntExist: boolean): Spy;
|
|
||||||
removeAllSpies(): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface XSpec {
|
|
||||||
id: number;
|
|
||||||
runs(): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Suite extends SuiteOrSpec {
|
|
||||||
|
|
||||||
new (env: Env, description: string, specDefinitions: () => void, parentSuite: Suite): any;
|
|
||||||
|
|
||||||
parentSuite: Suite;
|
|
||||||
|
|
||||||
getFullName(): string;
|
|
||||||
finish(onComplete?: () => void): void;
|
|
||||||
beforeEach(beforeEachFunction: SpecFunction): void;
|
|
||||||
afterEach(afterEachFunction: SpecFunction): void;
|
|
||||||
beforeAll(beforeAllFunction: SpecFunction): void;
|
|
||||||
afterAll(afterAllFunction: SpecFunction): void;
|
|
||||||
results(): NestedResults;
|
|
||||||
add(suiteOrSpec: SuiteOrSpec): void;
|
|
||||||
specs(): Spec[];
|
|
||||||
suites(): Suite[];
|
|
||||||
children(): any[];
|
|
||||||
execute(onComplete?: () => void): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface XSuite {
|
|
||||||
execute(): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Spy {
|
|
||||||
(...params: any[]): any;
|
|
||||||
|
|
||||||
identity: string;
|
|
||||||
and: SpyAnd;
|
|
||||||
calls: Calls;
|
|
||||||
mostRecentCall: { args: any[]; };
|
|
||||||
argsForCall: any[];
|
|
||||||
wasCalled: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface SpyAnd {
|
|
||||||
/** By chaining the spy with and.callThrough, the spy will still track all calls to it but in addition it will delegate to the actual implementation. */
|
|
||||||
callThrough(): Spy;
|
|
||||||
/** By chaining the spy with and.returnValue, all calls to the function will return a specific value. */
|
|
||||||
returnValue(val: any): Spy;
|
|
||||||
/** By chaining the spy with and.returnValues, all calls to the function will return specific values in order until it reaches the end of the return values list. */
|
|
||||||
returnValues(...values: any[]): Spy;
|
|
||||||
/** By chaining the spy with and.callFake, all calls to the spy will delegate to the supplied function. */
|
|
||||||
callFake(fn: Function): Spy;
|
|
||||||
/** By chaining the spy with and.throwError, all calls to the spy will throw the specified value. */
|
|
||||||
throwError(msg: string): Spy;
|
|
||||||
/** When a calling strategy is used for a spy, the original stubbing behavior can be returned at any time with and.stub. */
|
|
||||||
stub(): Spy;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Calls {
|
|
||||||
/** By chaining the spy with calls.any(), will return false if the spy has not been called at all, and then true once at least one call happens. **/
|
|
||||||
any(): boolean;
|
|
||||||
/** By chaining the spy with calls.count(), will return the number of times the spy was called **/
|
|
||||||
count(): number;
|
|
||||||
/** By chaining the spy with calls.argsFor(), will return the arguments passed to call number index **/
|
|
||||||
argsFor(index: number): any[];
|
|
||||||
/** By chaining the spy with calls.allArgs(), will return the arguments to all calls **/
|
|
||||||
allArgs(): any[];
|
|
||||||
/** By chaining the spy with calls.all(), will return the context (the this) and arguments passed all calls **/
|
|
||||||
all(): CallInfo[];
|
|
||||||
/** By chaining the spy with calls.mostRecent(), will return the context (the this) and arguments for the most recent call **/
|
|
||||||
mostRecent(): CallInfo;
|
|
||||||
/** By chaining the spy with calls.first(), will return the context (the this) and arguments for the first call **/
|
|
||||||
first(): CallInfo;
|
|
||||||
/** By chaining the spy with calls.reset(), will clears all tracking for a spy **/
|
|
||||||
reset(): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface CallInfo {
|
|
||||||
/** The context (the this) for the call */
|
|
||||||
object: any;
|
|
||||||
/** All arguments passed to the call */
|
|
||||||
args: any[];
|
|
||||||
/** The return value of the call */
|
|
||||||
returnValue: any;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Util {
|
|
||||||
inherit(childClass: Function, parentClass: Function): any;
|
|
||||||
formatException(e: any): any;
|
|
||||||
htmlEscape(str: string): string;
|
|
||||||
argsToArray(args: any): any;
|
|
||||||
extend(destination: any, source: any): any;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface JsApiReporter extends Reporter {
|
|
||||||
|
|
||||||
started: boolean;
|
|
||||||
finished: boolean;
|
|
||||||
result: any;
|
|
||||||
messages: any;
|
|
||||||
|
|
||||||
new (): any;
|
|
||||||
|
|
||||||
suites(): Suite[];
|
|
||||||
summarize_(suiteOrSpec: SuiteOrSpec): any;
|
|
||||||
results(): any;
|
|
||||||
resultsForSpec(specId: any): any;
|
|
||||||
log(str: any): any;
|
|
||||||
resultsForSpecs(specIds: any): any;
|
|
||||||
summarizeResult_(result: any): any;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Jasmine {
|
|
||||||
Spec: Spec;
|
|
||||||
clock: Clock;
|
|
||||||
util: Util;
|
|
||||||
}
|
|
||||||
|
|
||||||
export var HtmlReporter: HtmlReporter;
|
|
||||||
export var HtmlSpecFilter: HtmlSpecFilter;
|
|
||||||
export var DEFAULT_TIMEOUT_INTERVAL: number;
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
{
|
|
||||||
"resolution": "main",
|
|
||||||
"tree": {
|
|
||||||
"src": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/36a1be34dbe202c665b3ddafd50824f78c09eea3/jasmine/jasmine.d.ts",
|
|
||||||
"raw": "registry:dt/jasmine#2.2.0+20160505161446",
|
|
||||||
"typings": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/36a1be34dbe202c665b3ddafd50824f78c09eea3/jasmine/jasmine.d.ts"
|
|
||||||
}
|
|
||||||
}
|
|
80
typings/globals/json-pointer/index.d.ts
vendored
80
typings/globals/json-pointer/index.d.ts
vendored
|
@ -1,80 +0,0 @@
|
||||||
// Generated by typings
|
|
||||||
// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/7de6c3dd94feaeb21f20054b9f30d5dabc5efabd/json-pointer/json-pointer.d.ts
|
|
||||||
declare module "json-pointer" {
|
|
||||||
function JSON_Pointer(object: Object): JSON_Pointer.JSON_PointerWrap;
|
|
||||||
|
|
||||||
namespace JSON_Pointer {
|
|
||||||
/**
|
|
||||||
* Wrap an object with accessors
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* Looks up a JSON pointer in an object.
|
|
||||||
*/
|
|
||||||
function get(object: Object, pointer: string): any;
|
|
||||||
/**
|
|
||||||
* Set a value for a JSON pointer on object.
|
|
||||||
*/
|
|
||||||
function set(object: Object, pointer: string, value: any): void;
|
|
||||||
/**
|
|
||||||
* Removes an attribute of object referenced by pointer
|
|
||||||
*/
|
|
||||||
function remove(object: Object, pointer: string): void;
|
|
||||||
/**
|
|
||||||
* Creates a dictionary object (pointer -> value).
|
|
||||||
*/
|
|
||||||
function dict(object: Object): Object;
|
|
||||||
/**
|
|
||||||
* Just like: each(pointer.dict(obj), iterator);
|
|
||||||
*/
|
|
||||||
function walk(object: Object, iterator: (value: any, key: string) => void): void;
|
|
||||||
/**
|
|
||||||
* Tests if an object has a value for a JSON pointer.
|
|
||||||
*/
|
|
||||||
function has(object: Object, pointer: string): boolean;
|
|
||||||
/**
|
|
||||||
* Escapes a reference token.
|
|
||||||
*/
|
|
||||||
function escape(str: string): string;
|
|
||||||
/**
|
|
||||||
* Unescape a reference token.
|
|
||||||
*/
|
|
||||||
function unescape(str: string): string;
|
|
||||||
/**
|
|
||||||
* Converts a JSON pointer into an array of reference tokens.
|
|
||||||
*/
|
|
||||||
function parse(str: string): string[];
|
|
||||||
/**
|
|
||||||
* Builds a json pointer from an array of reference tokens.
|
|
||||||
*/
|
|
||||||
function compile(str: string[]): string;
|
|
||||||
|
|
||||||
interface JSON_PointerWrap {
|
|
||||||
/**
|
|
||||||
* Looks up a JSON pointer in an object.
|
|
||||||
*/
|
|
||||||
get(pointer: string): any;
|
|
||||||
/**
|
|
||||||
* Set a value for a JSON pointer on object.
|
|
||||||
*/
|
|
||||||
set(pointer: string, value: any): void;
|
|
||||||
/**
|
|
||||||
* Removes an attribute of object referenced by pointer
|
|
||||||
*/
|
|
||||||
remove(pointer: string): void;
|
|
||||||
/**
|
|
||||||
* Creates a dictionary object (pointer -> value).
|
|
||||||
*/
|
|
||||||
dict(): Object;
|
|
||||||
/**
|
|
||||||
* Just like: each(pointer.dict(obj), iterator);
|
|
||||||
*/
|
|
||||||
walk(iterator: (value: any, key: string) => void): void;
|
|
||||||
/**
|
|
||||||
* Tests if an object has a value for a JSON pointer.
|
|
||||||
*/
|
|
||||||
has(pointer: string): boolean;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default JSON_Pointer;
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
{
|
|
||||||
"resolution": "main",
|
|
||||||
"tree": {
|
|
||||||
"src": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/7de6c3dd94feaeb21f20054b9f30d5dabc5efabd/json-pointer/json-pointer.d.ts",
|
|
||||||
"raw": "registry:dt/json-pointer#1.0.0+20160317120654",
|
|
||||||
"typings": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/7de6c3dd94feaeb21f20054b9f30d5dabc5efabd/json-pointer/json-pointer.d.ts"
|
|
||||||
}
|
|
||||||
}
|
|
2590
typings/globals/node/index.d.ts
vendored
2590
typings/globals/node/index.d.ts
vendored
File diff suppressed because it is too large
Load Diff
|
@ -1,8 +0,0 @@
|
||||||
{
|
|
||||||
"resolution": "main",
|
|
||||||
"tree": {
|
|
||||||
"src": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/91d45c49a3b5cd6a0abbf5f319c1406fd4f2b1e7/node/node.d.ts",
|
|
||||||
"raw": "registry:dt/node#6.0.0+20160720070758",
|
|
||||||
"typings": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/91d45c49a3b5cd6a0abbf5f319c1406fd4f2b1e7/node/node.d.ts"
|
|
||||||
}
|
|
||||||
}
|
|
168
typings/globals/should/index.d.ts
vendored
168
typings/globals/should/index.d.ts
vendored
|
@ -1,168 +0,0 @@
|
||||||
// Generated by typings
|
|
||||||
// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/445ed7e54c1b2a8e84610afab0aab2b2ee2ffb4e/should/should.d.ts
|
|
||||||
interface Object {
|
|
||||||
should: ShouldAssertion;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface ShouldAssertion {
|
|
||||||
// basic grammar
|
|
||||||
a: ShouldAssertion;
|
|
||||||
an: ShouldAssertion;
|
|
||||||
and: ShouldAssertion;
|
|
||||||
be: ShouldAssertion;
|
|
||||||
has: ShouldAssertion;
|
|
||||||
have: ShouldAssertion;
|
|
||||||
is: ShouldAssertion;
|
|
||||||
it: ShouldAssertion;
|
|
||||||
with: ShouldAssertion;
|
|
||||||
which: ShouldAssertion;
|
|
||||||
the: ShouldAssertion;
|
|
||||||
of: ShouldAssertion;
|
|
||||||
not: ShouldAssertion;
|
|
||||||
|
|
||||||
// validators
|
|
||||||
arguments(): ShouldAssertion;
|
|
||||||
empty(): ShouldAssertion;
|
|
||||||
ok(): ShouldAssertion;
|
|
||||||
true(): ShouldAssertion;
|
|
||||||
false(): ShouldAssertion;
|
|
||||||
NaN(): ShouldAssertion;
|
|
||||||
Infinity(): ShouldAssertion;
|
|
||||||
Array(): ShouldAssertion;
|
|
||||||
Object(): ShouldAssertion;
|
|
||||||
String(): ShouldAssertion;
|
|
||||||
Boolean(): ShouldAssertion;
|
|
||||||
Number(): ShouldAssertion;
|
|
||||||
Error(): ShouldAssertion;
|
|
||||||
Function(): ShouldAssertion;
|
|
||||||
Date(): ShouldAssertion;
|
|
||||||
Class(): ShouldAssertion;
|
|
||||||
Undefined(): ShouldAssertion;
|
|
||||||
generator(): ShouldAssertion;
|
|
||||||
iterable(): ShouldAssertion;
|
|
||||||
iterator(): ShouldAssertion;
|
|
||||||
eql(expected: any, description?: string): ShouldAssertion;
|
|
||||||
equal(expected: any, description?: string): ShouldAssertion;
|
|
||||||
equalOneOf(...values: any[]): ShouldAssertion;
|
|
||||||
within(start: number, finish: number, description?: string): ShouldAssertion;
|
|
||||||
approximately(value: number, delta: number, description?: string): ShouldAssertion;
|
|
||||||
type(expected: any, description?: string): ShouldAssertion;
|
|
||||||
instanceof(constructor: Function, description?: string): ShouldAssertion;
|
|
||||||
above(n: number, description?: string): ShouldAssertion;
|
|
||||||
below(n: number, description?: string): ShouldAssertion;
|
|
||||||
aboveOrEqual(n: number, description?: string): ShouldAssertion;
|
|
||||||
greaterThanOrEqual(n: number, description?: string): ShouldAssertion;
|
|
||||||
belowOrEqual(n: number, description?: string): ShouldAssertion;
|
|
||||||
lessThanOrEqual(n: number, description?: string): ShouldAssertion;
|
|
||||||
match(other: {}, description?: string): ShouldAssertion;
|
|
||||||
match(other: (val: any) => any, description?: string): ShouldAssertion;
|
|
||||||
match(regexp: RegExp, description?: string): ShouldAssertion;
|
|
||||||
match(other: any, description?: string): ShouldAssertion;
|
|
||||||
matchEach(other: {}, description?: string): ShouldAssertion;
|
|
||||||
matchEach(other: (val: any) => any, description?: string): ShouldAssertion;
|
|
||||||
matchEach(regexp: RegExp, description?: string): ShouldAssertion;
|
|
||||||
matchEach(other: any, description?: string): ShouldAssertion;
|
|
||||||
matchAny(other: {}, description?: string): ShouldAssertion;
|
|
||||||
matchAny(other: (val: any) => any, description?: string): ShouldAssertion;
|
|
||||||
matchAny(regexp: RegExp, description?: string): ShouldAssertion;
|
|
||||||
matchAny(other: any, description?: string): ShouldAssertion;
|
|
||||||
length(n: number, description?: string): ShouldAssertion;
|
|
||||||
property(name: string, description?: string): ShouldAssertion;
|
|
||||||
property(name: string, val: any, description?: string): ShouldAssertion;
|
|
||||||
properties(names: string[]): ShouldAssertion;
|
|
||||||
properties(name: string): ShouldAssertion;
|
|
||||||
properties(descriptor: any): ShouldAssertion;
|
|
||||||
properties(...properties: string[]): ShouldAssertion;
|
|
||||||
propertyByPath(...properties: string[]): ShouldAssertion;
|
|
||||||
propertyWithDescriptor(name: string, descriptor: PropertyDescriptor): ShouldAssertion;
|
|
||||||
oneOf(...values: any[]): ShouldAssertion;
|
|
||||||
ownProperty(name: string, description?: string): ShouldAssertion;
|
|
||||||
containEql(obj: any): ShouldAssertion;
|
|
||||||
containDeep(obj: any): ShouldAssertion;
|
|
||||||
containDeepOrdered(obj: any): ShouldAssertion;
|
|
||||||
keys(...allKeys: string[]): ShouldAssertion;
|
|
||||||
keys(allKeys: string[]): ShouldAssertion;
|
|
||||||
enumerable(property: string, value?: any): ShouldAssertion;
|
|
||||||
enumerables(...properties: string[]): ShouldAssertion;
|
|
||||||
startWith(expected: string, message?: any): ShouldAssertion;
|
|
||||||
endWith(expected: string, message?: any): ShouldAssertion;
|
|
||||||
throw(message?: any): ShouldAssertion;
|
|
||||||
|
|
||||||
//http
|
|
||||||
header(field: string, val?: string): ShouldAssertion;
|
|
||||||
status(code: number): ShouldAssertion;
|
|
||||||
json(): ShouldAssertion;
|
|
||||||
html(): ShouldAssertion;
|
|
||||||
|
|
||||||
//stubs
|
|
||||||
alwaysCalledOn(thisTarget: any): ShouldAssertion;
|
|
||||||
alwaysCalledWith(...arguments: any[]): ShouldAssertion;
|
|
||||||
alwaysCalledWithExactly(...arguments: any[]): ShouldAssertion;
|
|
||||||
alwaysCalledWithMatch(...arguments: any[]): ShouldAssertion;
|
|
||||||
alwaysCalledWithNew(): ShouldAssertion;
|
|
||||||
alwaysThrew(exception?: any): ShouldAssertion;
|
|
||||||
callCount(count: number): ShouldAssertion;
|
|
||||||
called(): ShouldAssertion;
|
|
||||||
calledOn(thisTarget: any): ShouldAssertion;
|
|
||||||
calledOnce(): ShouldAssertion;
|
|
||||||
calledTwice(): ShouldAssertion;
|
|
||||||
calledThrice(): ShouldAssertion;
|
|
||||||
calledWith(...arguments: any[]): ShouldAssertion;
|
|
||||||
calledWithExactly(...arguments: any[]): ShouldAssertion;
|
|
||||||
calledWithMatch(...arguments: any[]): ShouldAssertion;
|
|
||||||
calledWithNew(): ShouldAssertion;
|
|
||||||
neverCalledWith(...arguments: any[]): ShouldAssertion;
|
|
||||||
neverCalledWithMatch(...arguments: any[]): ShouldAssertion;
|
|
||||||
threw(exception?: any): ShouldAssertion;
|
|
||||||
|
|
||||||
// aliases
|
|
||||||
True(): ShouldAssertion;
|
|
||||||
False(): ShouldAssertion;
|
|
||||||
Arguments(): ShouldAssertion;
|
|
||||||
class(): ShouldAssertion;
|
|
||||||
deepEqual(expected: any, description?: string): ShouldAssertion;
|
|
||||||
exactly(expected: any, description?: string): ShouldAssertion;
|
|
||||||
instanceOf(constructor: Function, description?: string): ShouldAssertion;
|
|
||||||
throwError(message?: any): ShouldAssertion;
|
|
||||||
lengthOf(n: number, description?: string): ShouldAssertion;
|
|
||||||
key(key: string): ShouldAssertion;
|
|
||||||
hasOwnProperty(name: string, description?: string): ShouldAssertion;
|
|
||||||
greaterThan(n: number, description?: string): ShouldAssertion;
|
|
||||||
lessThan(n: number, description?: string): ShouldAssertion;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface ShouldInternal {
|
|
||||||
// should.js's extras
|
|
||||||
exist(actual: any, msg?: string): void;
|
|
||||||
exists(actual: any, msg?: string): void;
|
|
||||||
not: ShouldInternal;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Internal extends ShouldInternal {
|
|
||||||
(obj: any): ShouldAssertion;
|
|
||||||
|
|
||||||
// node.js's assert functions
|
|
||||||
fail(actual: any, expected: any, message: string, operator: string): void;
|
|
||||||
assert(value: any, message: string): void;
|
|
||||||
ok(value: any, message?: string): void;
|
|
||||||
equal(actual: any, expected: any, message?: string): void;
|
|
||||||
notEqual(actual: any, expected: any, message?: string): void;
|
|
||||||
deepEqual(actual: any, expected: any, message?: string): void;
|
|
||||||
notDeepEqual(actual: any, expected: any, message?: string): void;
|
|
||||||
strictEqual(actual: any, expected: any, message?: string): void;
|
|
||||||
notStrictEqual(actual: any, expected: any, message?: string): void;
|
|
||||||
throws(block: any, error?: any, message?: string): void;
|
|
||||||
doesNotThrow(block: any, message?: string): void;
|
|
||||||
ifError(value: any): void;
|
|
||||||
inspect(value: any, obj: any): any;
|
|
||||||
}
|
|
||||||
|
|
||||||
declare var should: Internal;
|
|
||||||
declare var Should: Internal;
|
|
||||||
interface Window {
|
|
||||||
Should: Internal;
|
|
||||||
}
|
|
||||||
|
|
||||||
declare module "should" {
|
|
||||||
export = should;
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
{
|
|
||||||
"resolution": "main",
|
|
||||||
"tree": {
|
|
||||||
"src": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/445ed7e54c1b2a8e84610afab0aab2b2ee2ffb4e/should/should.d.ts",
|
|
||||||
"raw": "registry:dt/should#8.1.1+20160521152556",
|
|
||||||
"typings": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/445ed7e54c1b2a8e84610afab0aab2b2ee2ffb4e/should/should.d.ts"
|
|
||||||
}
|
|
||||||
}
|
|
4
typings/index.d.ts
vendored
4
typings/index.d.ts
vendored
|
@ -1,4 +0,0 @@
|
||||||
/// <reference path="globals/jasmine/index.d.ts" />
|
|
||||||
/// <reference path="globals/json-pointer/index.d.ts" />
|
|
||||||
/// <reference path="globals/node/index.d.ts" />
|
|
||||||
/// <reference path="globals/should/index.d.ts" />
|
|
4
typings/json-schema-ref-parser.d.ts
vendored
4
typings/json-schema-ref-parser.d.ts
vendored
|
@ -1,4 +0,0 @@
|
||||||
declare module 'json-schema-ref-parser' {
|
|
||||||
var x: any;
|
|
||||||
export default x;
|
|
||||||
}
|
|
3
typings/openapi-sampler.d.ts
vendored
3
typings/openapi-sampler.d.ts
vendored
|
@ -1,3 +0,0 @@
|
||||||
declare module "openapi-sampler" {
|
|
||||||
export function sample(schema:any, options?:any):any;
|
|
||||||
}
|
|
4
typings/remarkable.d.ts
vendored
4
typings/remarkable.d.ts
vendored
|
@ -1,4 +0,0 @@
|
||||||
declare module 'remarkable' {
|
|
||||||
var x: any;
|
|
||||||
export default x;
|
|
||||||
}
|
|
6
typings/scrollparent.d.ts
vendored
6
typings/scrollparent.d.ts
vendored
|
@ -1,6 +0,0 @@
|
||||||
// Generated by typings
|
|
||||||
// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/7de6c3dd94feaeb21f20054b9f30d5dabc5efabd/json-pointer/json-pointer.d.ts
|
|
||||||
declare module "scrollparent" {
|
|
||||||
var x: any;
|
|
||||||
export default x;
|
|
||||||
}
|
|
4
typings/slugify.d.ts
vendored
4
typings/slugify.d.ts
vendored
|
@ -1,4 +0,0 @@
|
||||||
declare module 'slugify' {
|
|
||||||
var x: any;
|
|
||||||
export default x;
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user