From 5ea2c55207eeee2a1464fd329c15d75a6d61ece1 Mon Sep 17 00:00:00 2001 From: Erik Soehnel Date: Wed, 6 Dec 2023 17:23:42 +0100 Subject: [PATCH] fix lint errors --- src/dictionary.ts | 7 +++---- src/record.ts | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/dictionary.ts b/src/dictionary.ts index dbb377c..cc8e1d2 100644 --- a/src/dictionary.ts +++ b/src/dictionary.ts @@ -1,14 +1,13 @@ import { objectRuntype } from './object' import { createFail, - setupInternalRuntype, + InternalRuntypeOf, isFail, propagateFail, - getInternalRuntype, - InternalRuntypeOf, + setupInternalRuntype, } from './runtype' +import type { Runtype } from './runtype' import { debugValue } from './runtypeError' -import type { Runtype, InternalRuntype, Fail } from './runtype' const internalObjectRuntype: InternalRuntypeOf = objectRuntype diff --git a/src/record.ts b/src/record.ts index 3cf89ca..1012dce 100644 --- a/src/record.ts +++ b/src/record.ts @@ -58,7 +58,7 @@ export function internalRecord( // checked at all // this is vital to preserve the object shape of an impure record // with optional fields - if (t.meta?.optional && !o.hasOwnProperty(k)) { + if (t.meta?.optional && !Object.prototype.hasOwnProperty.call(o, k)) { break }