From 2a9e5b6e9f48ba1ae7f2ad30a502fdca20988d8e Mon Sep 17 00:00:00 2001 From: Christopher Woodland Date: Mon, 5 Mar 2018 15:25:07 -0500 Subject: [PATCH 1/3] - Update _Frisbyspec.get_, _Frisbyspec.post_, _Frisbyspec.put_, _Frisbyspec.del_, _Frisbyspec.patch_, _Frisbyspec.fetch_ to allow _params_ to be optional. - Update _FrisbySpec.then_ to allow _onRejected_ to be optional. --- types/frisby/CHANGELOG.md | 10 ++++++++++ types/frisby/index.d.ts | 14 +++++++------- 2 files changed, 17 insertions(+), 7 deletions(-) create mode 100644 types/frisby/CHANGELOG.md diff --git a/types/frisby/CHANGELOG.md b/types/frisby/CHANGELOG.md new file mode 100644 index 0000000000..4b07f01aca --- /dev/null +++ b/types/frisby/CHANGELOG.md @@ -0,0 +1,10 @@ +# Change Log +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/) +and this project adheres to [Semantic Versioning](http://semver.org/). + +## 2018-03-05 +### Changed +- Update _Frisbyspec.get_, _Frisbyspec.post_, _Frisbyspec.put_, _Frisbyspec.del_, _Frisbyspec.patch_, _Frisbyspec.fetch_ to allow _params_ to be optional. +- Update _FrisbySpec.then_ to allow _onRejected_ to be optional. diff --git a/types/frisby/index.d.ts b/types/frisby/index.d.ts index 366a3998d7..e931b8b4cd 100644 --- a/types/frisby/index.d.ts +++ b/types/frisby/index.d.ts @@ -21,13 +21,13 @@ export import Joi = require("joi"); export class FrisbySpec { constructor(...args: any[]); catch(onRejected?: (error: Error) => void): FrisbySpec; - del(url: string, params: {}): FrisbySpec; + del(url: string, params?: {}): FrisbySpec; done(doneFn: (...args: any[]) => void): FrisbySpec; expect(expectName: string, ...args: any[]): FrisbySpec; expectNot(expectName: string): FrisbySpec; - fetch(url: string, params: {}, options?: {}): FrisbySpec; + fetch(url: string, params?: {}, options?: {}): FrisbySpec; fromJSON(json: {}): FrisbySpec; - get(url: string, params: {}): FrisbySpec; + get(url: string, params?: {}): FrisbySpec; getBaseUrl(): string | boolean; inspectBody(): FrisbySpec; inspectHeaders(): FrisbySpec; @@ -37,12 +37,12 @@ export class FrisbySpec { inspectRequestHeaders(): FrisbySpec; inspectResponse(): FrisbySpec; inspectStatus(): FrisbySpec; - patch(url: string, params: {}): FrisbySpec; - post(url: string, params: {}): FrisbySpec; + patch(url: string, params?: {}): FrisbySpec; + post(url: string, params?: {}): FrisbySpec; promise(): Promise; - put(url: string, params: {}): FrisbySpec; + put(url: string, params?: {}): FrisbySpec; setup(opts: {}, replace: boolean): FrisbySpec; - then(onFulfilled: {} | ((...args: any[]) => void), onRejected: (...args: any[]) => void): FrisbySpec; + then(onFulfilled: {} | ((...args: any[]) => void), onRejected?: (...args: any[]) => void): FrisbySpec; timeout(timeout: number): number; use(fn: (...args: any[]) => void): FrisbySpec; static addExpectHandler(expectName: string, expectFn: (...args: any[]) => any): void; From d9df4c106d9ffc295e6727381eb8602a00dc5eeb Mon Sep 17 00:00:00 2001 From: Christopher Woodland Date: Mon, 5 Mar 2018 15:31:23 -0500 Subject: [PATCH 2/3] remove changelog --- types/frisby/CHANGELOG.md | 10 ---------- types/frisby/index.d.ts | 12 ++++++++++++ 2 files changed, 12 insertions(+), 10 deletions(-) delete mode 100644 types/frisby/CHANGELOG.md diff --git a/types/frisby/CHANGELOG.md b/types/frisby/CHANGELOG.md deleted file mode 100644 index 4b07f01aca..0000000000 --- a/types/frisby/CHANGELOG.md +++ /dev/null @@ -1,10 +0,0 @@ -# Change Log -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](http://keepachangelog.com/) -and this project adheres to [Semantic Versioning](http://semver.org/). - -## 2018-03-05 -### Changed -- Update _Frisbyspec.get_, _Frisbyspec.post_, _Frisbyspec.put_, _Frisbyspec.del_, _Frisbyspec.patch_, _Frisbyspec.fetch_ to allow _params_ to be optional. -- Update _FrisbySpec.then_ to allow _onRejected_ to be optional. diff --git a/types/frisby/index.d.ts b/types/frisby/index.d.ts index e931b8b4cd..0586f99ed2 100644 --- a/types/frisby/index.d.ts +++ b/types/frisby/index.d.ts @@ -18,6 +18,18 @@ export import Joi = require("joi"); // #region Frisby FrisbySpec Methods // Reference file: https://github.com/vlucas/frisby/blob/master/src/frisby/spec.js + + +// **************************************CHANGE LOG************************************** +// C.E.W. This is an attempt to create some sort of changelog for these types. +// If you make any changes, please try and note those changes in this section. +// If this section gets too long we can always trim it. +// ## 2018-03-05 +// ### Changed +// - Update _Frisbyspec.get_, _Frisbyspec.post_, _Frisbyspec.put_, _Frisbyspec.del_, _Frisbyspec.patch_, _Frisbyspec.fetch_ to allow _params_ to be optional. +// - Update _FrisbySpec.then_ to allow _onRejected_ to be optional. +// **************************************CHANGE LOG************************************** + export class FrisbySpec { constructor(...args: any[]); catch(onRejected?: (error: Error) => void): FrisbySpec; From c84aeac456c8e8cb71141df87563d04a67d2be37 Mon Sep 17 00:00:00 2001 From: Christopher Woodland Date: Mon, 5 Mar 2018 15:38:24 -0500 Subject: [PATCH 3/3] remove white space --- types/frisby/index.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/types/frisby/index.d.ts b/types/frisby/index.d.ts index 0586f99ed2..9057edae6d 100644 --- a/types/frisby/index.d.ts +++ b/types/frisby/index.d.ts @@ -19,7 +19,6 @@ export import Joi = require("joi"); // #region Frisby FrisbySpec Methods // Reference file: https://github.com/vlucas/frisby/blob/master/src/frisby/spec.js - // **************************************CHANGE LOG************************************** // C.E.W. This is an attempt to create some sort of changelog for these types. // If you make any changes, please try and note those changes in this section.