Use === in without.ts

This commit is contained in:
Jerko Steiner 2019-03-25 13:20:03 +08:00
parent c1d7077061
commit 5c22f44930

View File

@ -3,8 +3,7 @@ export function without<T, R extends Record<string, T>, K extends keyof R>(
key: K, key: K,
): Pick<R, Exclude<keyof R, K>> { ): Pick<R, Exclude<keyof R, K>> {
return Object.keys(items).reduce((obj, k) => { return Object.keys(items).reduce((obj, k) => {
// tslint:disable-next-line if (key === k) {
if (key == k) {
return obj return obj
} }
(obj as any)[k] = items[k] (obj as any)[k] = items[k]