From 4c0b6d6251f3a57cf73bd2ca54cf25dd5f48a5d0 Mon Sep 17 00:00:00 2001 From: Behind The Math Date: Tue, 20 Mar 2018 21:32:56 -0400 Subject: [PATCH] Add TS definitions for options.requestOptions --- index.d.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/index.d.ts b/index.d.ts index ed9b993..0787688 100644 --- a/index.d.ts +++ b/index.d.ts @@ -168,9 +168,23 @@ declare namespace Pjax { * will not work, due to the query string appended to force a cache bust). */ currentUrlFullReload: boolean; + + /** + * Hold the information to make an XHR request. + */ + requestOptions?: { + requestUrl?: string; + requestMethod?: string; + requestParams?: IRequestParams[]; + } } export type Switch = (oldEl: Element, newEl: Element, options?: IOptions, switchesOptions?: StringKeyedObject) => void; + + export interface IRequestParams { + name: string, + value: string + } } interface StringKeyedObject {