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)) {