Add TS definitions for options.requestOptions
This commit is contained in:
14
index.d.ts
vendored
14
index.d.ts
vendored
@@ -168,9 +168,23 @@ declare namespace Pjax {
|
|||||||
* will not work, due to the query string appended to force a cache bust).
|
* will not work, due to the query string appended to force a cache bust).
|
||||||
*/
|
*/
|
||||||
currentUrlFullReload: boolean;
|
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 type Switch = (oldEl: Element, newEl: Element, options?: IOptions, switchesOptions?: StringKeyedObject) => void;
|
||||||
|
|
||||||
|
export interface IRequestParams {
|
||||||
|
name: string,
|
||||||
|
value: string
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
interface StringKeyedObject<T = any> {
|
interface StringKeyedObject<T = any> {
|
||||||
|
|||||||
Reference in New Issue
Block a user