|
25 | 25 | */ |
26 | 26 | export default class Kitsu { |
27 | 27 | constructor(options?: {}); |
28 | | - camel: any; |
29 | | - resCase: any; |
| 28 | + camel: (s: any) => any; |
| 29 | + resCase: (s: any) => any; |
30 | 30 | plural: any; |
31 | 31 | /** |
32 | 32 | * Get the current headers or add additional headers |
@@ -54,7 +54,7 @@ export default class Kitsu { |
54 | 54 | }, headers?: any) => any; |
55 | 55 | update: (model: string, body: any, headers?: any) => any; |
56 | 56 | create: (model: string, body: any, headers?: any) => any; |
57 | | - remove: (model: string, id: string | number | Array, headers?: any) => any; |
| 57 | + remove: (model: string, id: string | number | number[], headers?: any) => any; |
58 | 58 | /** |
59 | 59 | * Axios Interceptors (alias of `axios.interceptors`) |
60 | 60 | * |
@@ -221,15 +221,15 @@ export default class Kitsu { |
221 | 221 | * |
222 | 222 | * @memberof Kitsu |
223 | 223 | * @param {string} model Model to remove data from |
224 | | - * @param {string|number|Array} id Resource ID to remove. Pass an array of IDs to delete multiple resources (Bulk Extension) |
| 224 | + * @param {string|number|number[]} id Resource ID to remove. Pass an array of IDs to delete multiple resources (Bulk Extension) |
225 | 225 | * @param {Object} headers Additional headers to send with the request |
226 | 226 | * @returns {Object} JSON-parsed response |
227 | 227 | * @example <caption>Remove a single resource</caption> |
228 | 228 | * api.delete('posts', 123) |
229 | 229 | * @example <caption>Remove multiple resources (API must support the Bulk Extension)</caption> |
230 | 230 | * api.delete('posts', [ 1, 2 ]) |
231 | 231 | */ |
232 | | - delete(model: string, id: string | number | Array, headers?: any): any; |
| 232 | + delete(model: string, id: string | number | number[], headers?: any): any; |
233 | 233 | /** |
234 | 234 | * Get the authenticated user's data |
235 | 235 | * |
@@ -261,7 +261,7 @@ export default class Kitsu { |
261 | 261 | * |
262 | 262 | * @memberof Kitsu |
263 | 263 | * @param {Object} config Request configuration |
264 | | - * @param {Object|Array} config.body Data to send in the request |
| 264 | + * @param {Object|Object[]} config.body Data to send in the request |
265 | 265 | * @param {string} config.method Request method - `GET`, `PATCH`, `POST` or `DELETE` (defaults to `GET`, case-insensitive) |
266 | 266 | * @param {Object} config.params JSON-API request queries |
267 | 267 | * @param {Object} config.params.page [JSON:API Pagination](http://jsonapi.org/format/#fetching-pagination) |
@@ -314,7 +314,7 @@ export default class Kitsu { |
314 | 314 | * }) |
315 | 315 | */ |
316 | 316 | request({ body, method, params, type, url }: { |
317 | | - body: any | Array; |
| 317 | + body: any | any[]; |
318 | 318 | method: string; |
319 | 319 | params: { |
320 | 320 | page: { |
|
0 commit comments