-
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
import { omit } from 'filter-anything'
const obj1 = {
a: 1,
b: 2,
c: 3,
}
const obj2 = {
a: 2,
c: 3,
d: 4,
}
type CommonKeys = Extract<keyof typeof obj1, keyof typeof obj2> // 'a' | 'c'
const commonKeyss = Object.keys(obj1).filter(key => obj2.hasOwnProperty(key)) as CommonKeys[] // ['a', 'c']
const aa = omit(obj1, commonKeyss)
aa. // dont working dont a see only `b` 
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels