From 4f79b9744dc8cddcc2f9b6830b831dcb37cd13a9 Mon Sep 17 00:00:00 2001 From: Kuitos Date: Thu, 24 Dec 2020 15:21:58 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20add=20yarn=20build=20to=20ci=20(?= =?UTF-8?q?#1180)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/sandbox/legacy/sandbox.ts | 4 ++-- src/sandbox/snapshotSandbox.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 9c400b5..1ea1b7b 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "prettier": "prettier --write ./src/**/*", "docs:dev": "dumi dev", "docs:build": "dumi build", - "ci": "yarn lint && yarn test", + "ci": "yarn lint && yarn build && yarn test", "test": "cross-env NODE_ENV=test jest" }, "repository": { diff --git a/src/sandbox/legacy/sandbox.ts b/src/sandbox/legacy/sandbox.ts index 14eb506..9a72299 100644 --- a/src/sandbox/legacy/sandbox.ts +++ b/src/sandbox/legacy/sandbox.ts @@ -2,11 +2,11 @@ * @author Kuitos * @since 2019-04-11 */ -import type { ObjectType, SandBox } from '../../interfaces'; +import type { SandBox } from '../../interfaces'; import { SandBoxType } from '../../interfaces'; import { getTargetValue } from '../common'; -function isPropConfigurable(target: ObjectType, prop: PropertyKey) { +function isPropConfigurable(target: typeof window, prop: PropertyKey) { const descriptor = Object.getOwnPropertyDescriptor(target, prop); return descriptor ? descriptor.configurable : true; } diff --git a/src/sandbox/snapshotSandbox.ts b/src/sandbox/snapshotSandbox.ts index 7ed6058..9774b36 100644 --- a/src/sandbox/snapshotSandbox.ts +++ b/src/sandbox/snapshotSandbox.ts @@ -2,10 +2,10 @@ * @author Hydrogen * @since 2020-3-8 */ -import type { ObjectType, SandBox } from '../interfaces'; +import type { SandBox } from '../interfaces'; import { SandBoxType } from '../interfaces'; -function iter(obj: ObjectType, callbackFn: (prop: any) => void) { +function iter(obj: typeof window, callbackFn: (prop: any) => void) { // eslint-disable-next-line guard-for-in, no-restricted-syntax for (const prop in obj) { if (obj.hasOwnProperty(prop)) {