Skip to content

Commit

Permalink
Merge pull request #34 from creately/onkey-type-issue
Browse files Browse the repository at this point in the history
  • Loading branch information
chandika authored Oct 28, 2021
2 parents 644e5df + 5864b67 commit e16b3aa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,10 @@ export class Sakota<T extends object> implements ProxyHandler<T> {
/**
* Proxy handler trap for `Reflect.ownKeys()`.
*/
public ownKeys(obj: any): (string | symbol)[] {
const keys = Reflect.ownKeys(obj);
public ownKeys(obj: any): (string | symbol)[] {
// FIXME: need to figure out why this return (string | number | symbol)[]
// which is not the same as the return type of ES2015 Reflect.ownKeys.
const keys = Reflect.ownKeys(obj) as (string | symbol)[];
if (this.diff) {
for (const key in this.diff.$set) {
if (!Object.prototype.hasOwnProperty.call(this.diff.$set, key)) {
Expand Down

0 comments on commit e16b3aa

Please sign in to comment.