Skip to content

Commit

Permalink
fix types for PixivFetchOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
kokororin committed Apr 15, 2020
1 parent effcb01 commit f778376
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/PixivTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export interface PixivParams {
}

export interface PixivFetchOptions {
data?: string
data?: PixivParams
method?: string
headers?: {
[header: string]: string
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ export default class PixivApp<CamelcaseKeys extends boolean = true> {
options.headers = {
'Content-Type': 'application/x-www-form-urlencoded',
}
options.data = stringify(decamelizeKeys(options.data))
options.data = stringify(decamelizeKeys(options.data)) as PixivParams
}

if (options.params) {
Expand Down

0 comments on commit f778376

Please sign in to comment.