Add TS definitions for options.requestOptions

This commit is contained in:
Behind The Math
2018-03-20 21:32:56 -04:00
parent b3f7fcefee
commit 4c0b6d6251

14
index.d.ts vendored
View File

@@ -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<T = any> {