Bump TypeScript version

This commit is contained in:
Sindre Sorhus 2018-11-30 14:28:54 +07:00
parent b8a9fb457c
commit 9df6f4ebe9
4 changed files with 11 additions and 30 deletions

View file

@ -47,9 +47,10 @@
"symbol-observable": "^1.2.0" "symbol-observable": "^1.2.0"
}, },
"devDependencies": { "devDependencies": {
"@sindresorhus/tsconfig": "^0.1.0",
"@types/jsdom": "^11.12.0", "@types/jsdom": "^11.12.0",
"@types/node": "^10.11.2", "@types/node": "^10.12.10",
"@types/tempy": "^0.1.0", "@types/tempy": "^0.2.0",
"@types/zen-observable": "^0.8.0", "@types/zen-observable": "^0.8.0",
"ava": "*", "ava": "*",
"del-cli": "^1.1.0", "del-cli": "^1.1.0",
@ -57,8 +58,8 @@
"rxjs": "^6.3.3", "rxjs": "^6.3.3",
"tempy": "^0.2.1", "tempy": "^0.2.1",
"tslint": "^5.9.1", "tslint": "^5.9.1",
"tslint-xo": "^0.9.0", "tslint-xo": "^0.10.0",
"typescript": "^3.1.4", "typescript": "^3.2.1",
"zen-observable": "^0.8.8" "zen-observable": "^0.8.8"
}, },
"types": "dist/index.d.ts" "types": "dist/index.d.ts"

View file

@ -60,7 +60,7 @@ const isOfType = <T>(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 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 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) { if (objectName) {
return objectName as TypeName; return objectName as TypeName;
@ -301,7 +301,7 @@ namespace is { // tslint:disable-line:no-namespace
throw new TypeError('Invalid number of values'); throw new TypeError('Invalid number of values');
} }
return method.call(values, predicate); return method.call(values, predicate as any);
}; };
// tslint:disable variable-name // tslint:disable variable-name

View file

@ -21,8 +21,8 @@ const {document} = window;
const createDomElement = (element: string) => document.createElement(element); const createDomElement = (element: string) => document.createElement(element);
interface Test { interface Test {
is(value: unknown): boolean;
fixtures: unknown[]; fixtures: unknown[];
is(value: unknown): boolean;
} }
const types = new Map<string, Test>([ const types = new Map<string, Test>([

View file

@ -1,4 +1,5 @@
{ {
"extends": "@sindresorhus/tsconfig",
"compilerOptions": { "compilerOptions": {
"outDir": "dist", "outDir": "dist",
"target": "es2016", "target": "es2016",
@ -7,27 +8,6 @@
"es2017.sharedmemory", "es2017.sharedmemory",
"esnext.asynciterable", "esnext.asynciterable",
"dom" "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"
]
} }