Skip to content

Commit

Permalink
types: TypeScript 4.8 compatibility (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
bendrucker committed Aug 29, 2022
1 parent f9c7bfd commit 11e6eb5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion index.d.ts
Expand Up @@ -51,7 +51,9 @@ declare namespace snakecaseKeys {
> = T extends readonly any[]
? // Handle arrays or tuples.
{
[P in keyof T]: SnakeCaseKeys<T[P], Deep, Exclude>;
[P in keyof T]: T[P] extends Record<string, any> | readonly any[]
? SnakeCaseKeys<T[P], Deep, Exclude>
: T[P];
}
: T extends Record<string, any>
? // Handle objects.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -23,7 +23,7 @@
"devDependencies": {
"standard": "^17.0.0",
"tape": "^5.0.1",
"tsd": "^0.22.0"
"tsd": "^0.23.0"
},
"files": [
"index.js",
Expand Down

0 comments on commit 11e6eb5

Please sign in to comment.