mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 04:50:18 +00:00
Make ramda typings tests pass strict null checks
This commit is contained in:
Vendored
+2
-2
@@ -201,8 +201,8 @@ declare namespace R {
|
||||
* A function that returns the first argument if it's falsy otherwise the second argument. Note that this is
|
||||
* NOT short-circuited, meaning that if expressions are passed they are both evaluated.
|
||||
*/
|
||||
and<T extends { and?: ((...a: any[]) => any); } | number | boolean | string>(fn1: T, val2: any): boolean;
|
||||
and<T extends { and?: ((...a: any[]) => any); } | number | boolean | string>(fn1: T): (val2: any) => boolean;
|
||||
and<T extends { and?: ((...a: any[]) => any); } | number | boolean | string | null>(fn1: T, val2: any): boolean;
|
||||
and<T extends { and?: ((...a: any[]) => any); } | number | boolean | string | null>(fn1: T): (val2: any) => boolean;
|
||||
|
||||
/**
|
||||
* Returns true if at least one of elements of the list match the predicate, false otherwise.
|
||||
|
||||
@@ -415,7 +415,7 @@ R.times(i, 5);
|
||||
*/
|
||||
() => {
|
||||
function mergeThree(a: number, b: number, c: number): number[] {
|
||||
return ([]).concat(a, b, c);
|
||||
return (new Array<number>()).concat(a, b, c);
|
||||
}
|
||||
|
||||
mergeThree(1, 2, 3); // => [1, 2, 3]
|
||||
@@ -2314,7 +2314,7 @@ class Why {
|
||||
const x0: boolean = R.or(false, true); // => false
|
||||
const x1: number | any[] = R.or(0, []); // => []
|
||||
const x2: number | any[] = R.or(0)([]); // => []
|
||||
const x3: string = R.or(null, ""); // => ''
|
||||
const x3: string | null = R.or(null, ""); // => ''
|
||||
|
||||
const why = new Why(true);
|
||||
why.or(true);
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": false,
|
||||
"strictNullChecks": false,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": false,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
@@ -22,4 +22,4 @@
|
||||
"index.d.ts",
|
||||
"ramda-tests.ts"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user