Skip to content

Commit

Permalink
Merge pull request #21 from Tenpi/default-true
Browse files Browse the repository at this point in the history
fix: Make CamelcaseKeys true by default
  • Loading branch information
akameco authored Oct 4, 2019
2 parents 298d054 + 9c1d67c commit 00eeee4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules
.envrc
dist
.vscode
dist
src/test.ts
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"node": ">=8"
},
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"add-contributor": "all-contributors add",
"fmt": "prettier --write '**/*.{ts,js,json,md}'",
Expand Down
6 changes: 4 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ const HASH_SECRET =
'28c1fdd170a5204386cb1313c7077b34f83e4aaf4aa829ce78c231e05b0bae2c'
const filter = 'for_ios'

export default class PixivApp<CamelcaseKeys extends boolean> {
camelcaseKeys = true as CamelcaseKeys
export default class PixivApp<CamelcaseKeys extends boolean = true> {
camelcaseKeys: CamelcaseKeys
username: string | undefined
password: string | undefined
refreshToken: string
Expand All @@ -76,6 +76,8 @@ export default class PixivApp<CamelcaseKeys extends boolean> {
this._once = false
if (options) {
this.camelcaseKeys = Boolean(options.camelcaseKeys) as CamelcaseKeys
} else {
this.camelcaseKeys = true as CamelcaseKeys
}
}

Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"outDir": "dist",
"strict": true,
"noImplicitAny": true
"noImplicitAny": true,
"declaration": true
},
"include": ["src", "declarations.d.ts"]
}

0 comments on commit 00eeee4

Please sign in to comment.