diff --git a/src/index.ts b/src/index.ts index 79cf695..7c53a9f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -179,8 +179,10 @@ export class Sakota implements ProxyHandler { /** * 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)) {