Skip to content

Commit

Permalink
Merge pull request #40 from grissius/chore/update-deps
Browse files Browse the repository at this point in the history
⬆️ Update deps
  • Loading branch information
smolijar authored Sep 22, 2021
2 parents 208643f + 825e1e7 commit 165d789
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,23 @@
"cs:prettier:fix": "npm run cs:prettier:check -- --write '**/*.{ts,js,json,md}'"
},
"dependencies": {
"@grpc/grpc-js": "^1.3.2",
"@types/google-protobuf": "^3.15.2"
"@grpc/grpc-js": "^1.3.7",
"@types/google-protobuf": "^3.15.5"
},
"devDependencies": {
"@ackee/styleguide-backend-config": "^0.2.2",
"@types/jest": "^26.0.23",
"codecov": "^3.8.2",
"google-protobuf": "^3.17.0",
"grpc-tools": "^1.11.1",
"grpc_tools_node_protoc_ts": "^5.2.2",
"google-protobuf": "^3.18.0",
"grpc-tools": "^1.11.2",
"grpc_tools_node_protoc_ts": "^5.3.2",
"husky": "^6.0.0",
"jest": "^26.6.3",
"lint-staged": "^11.0.0",
"prettier": "^2.3.0",
"ts-jest": "^26.5.6",
"typedoc": "^0.20.36",
"typedoc-plugin-markdown": "^3.8.1",
"typescript": "^4.2.4"
"typescript": "^4.4.3"
}
}
9 changes: 3 additions & 6 deletions src/lib/misc/type-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,14 @@ import { EventEmitter } from 'events'

// List object keys without index signatures
// KnownKeys<{ [index: string]: string; foo: string }> = 'foo'
type KnownKeys<T> = ({
type KnownKeys<T> = {
[K in keyof T]: string extends K ? never : number extends K ? never : K
} extends { [_ in keyof T]: infer U }
? U
: never) &
keyof T
} extends Record<any, infer X> ? X extends keyof T ? X : never : never

// List keys with never value
type NeverKeys<T> = ({
[K in keyof T]: T[K] extends never ? never : K
} extends { [_ in keyof T]: infer U }
} extends Record<any, infer U>
? U
: never) &
keyof T
Expand Down
2 changes: 1 addition & 1 deletion src/lib/server/middleware/on-error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Middleware, ProtoCatAnyCall } from '../call'
import { CallType } from '../../call-types'
import { Metadata } from '@grpc/grpc-js'

type ErrorHandler = (error: Error, call: ProtoCatAnyCall) => any
type ErrorHandler = (error: unknown, call: ProtoCatAnyCall) => any

const merged = Symbol('protocat.merged')

Expand Down

0 comments on commit 165d789

Please sign in to comment.