diff --git a/package.json b/package.json index 6479b12..5ef42c7 100644 --- a/package.json +++ b/package.json @@ -47,9 +47,10 @@ "symbol-observable": "^1.2.0" }, "devDependencies": { + "@sindresorhus/tsconfig": "^0.1.0", "@types/jsdom": "^11.12.0", - "@types/node": "^10.11.2", - "@types/tempy": "^0.1.0", + "@types/node": "^10.12.10", + "@types/tempy": "^0.2.0", "@types/zen-observable": "^0.8.0", "ava": "*", "del-cli": "^1.1.0", @@ -57,8 +58,8 @@ "rxjs": "^6.3.3", "tempy": "^0.2.1", "tslint": "^5.9.1", - "tslint-xo": "^0.9.0", - "typescript": "^3.1.4", + "tslint-xo": "^0.10.0", + "typescript": "^3.2.1", "zen-observable": "^0.8.8" }, "types": "dist/index.d.ts" diff --git a/source/index.ts b/source/index.ts index 8b52bc1..37e775b 100644 --- a/source/index.ts +++ b/source/index.ts @@ -60,7 +60,7 @@ const isOfType = (type: string) => (value: unknown): value is T => typeof val const isBuffer = (input: unknown): input is Buffer => !is.nullOrUndefined(input) && !is.nullOrUndefined((input as Buffer).constructor) && is.function_((input as Buffer).constructor.isBuffer) && (input as Buffer).constructor.isBuffer(input); const getObjectType = (value: unknown): TypeName | null => { - const objectName = toString.call(value).slice(8, -1) as string; + const objectName = toString.call(value).slice(8, -1); if (objectName) { return objectName as TypeName; @@ -301,7 +301,7 @@ namespace is { // tslint:disable-line:no-namespace throw new TypeError('Invalid number of values'); } - return method.call(values, predicate); + return method.call(values, predicate as any); }; // tslint:disable variable-name diff --git a/source/tests/test.ts b/source/tests/test.ts index 4fcac81..98cb287 100644 --- a/source/tests/test.ts +++ b/source/tests/test.ts @@ -21,8 +21,8 @@ const {document} = window; const createDomElement = (element: string) => document.createElement(element); interface Test { - is(value: unknown): boolean; fixtures: unknown[]; + is(value: unknown): boolean; } const types = new Map([ diff --git a/tsconfig.json b/tsconfig.json index e1bc1fa..5f5c71e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,4 +1,5 @@ { + "extends": "@sindresorhus/tsconfig", "compilerOptions": { "outDir": "dist", "target": "es2016", @@ -7,27 +8,6 @@ "es2017.sharedmemory", "esnext.asynciterable", "dom" - ], - "module": "commonjs", - "moduleResolution": "node", - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "sourceMap": true, - "declaration": true, - "pretty": true, - "newLine": "lf", - "stripInternal": true, - "strict": true, - "noImplicitReturns": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "noFallthroughCasesInSwitch": true, - "noEmitOnError": true, - "forceConsistentCasingInFileNames": true, - "skipLibCheck": true - }, - "exclude": [ - "node_modules", - "dist" - ] + ] + } }