From 53ec42bbcdd9621ab13dfa2537918f622adc9963 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Corbi=C3=A8re?= Date: Wed, 29 Nov 2017 12:42:27 +0100 Subject: [PATCH 1/5] Adds missing export for lodash/defaultTo. --- types/lodash/defaultTo.d.ts | 2 ++ types/lodash/tsconfig.json | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 types/lodash/defaultTo.d.ts diff --git a/types/lodash/defaultTo.d.ts b/types/lodash/defaultTo.d.ts new file mode 100644 index 0000000000..89fb56505f --- /dev/null +++ b/types/lodash/defaultTo.d.ts @@ -0,0 +1,2 @@ +import { defaultTo } from "./index"; +export = defaultTo; diff --git a/types/lodash/tsconfig.json b/types/lodash/tsconfig.json index 8fdd6ddff3..7e2de20632 100644 --- a/types/lodash/tsconfig.json +++ b/types/lodash/tsconfig.json @@ -6,6 +6,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, + "strictFunctionTypes": false, "strictNullChecks": true, "baseUrl": "../", "typeRoots": [ @@ -53,6 +54,7 @@ "deburr.d.ts", "defaults.d.ts", "defaultsDeep.d.ts", + "defaultTo.d.ts", "defer.d.ts", "delay.d.ts", "difference.d.ts", @@ -304,4 +306,4 @@ "zipObject.d.ts", "zipWith.d.ts" ] -} \ No newline at end of file +} From 2428c4197f851444a3708c0ddb43f39e745227c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Corbi=C3=A8re?= Date: Thu, 30 Nov 2017 11:25:45 +0100 Subject: [PATCH 2/5] Fixes lint errors in test file. --- types/lodash/lodash-tests.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/types/lodash/lodash-tests.ts b/types/lodash/lodash-tests.ts index e00d951023..7f624ec50c 100644 --- a/types/lodash/lodash-tests.ts +++ b/types/lodash/lodash-tests.ts @@ -5702,7 +5702,7 @@ namespace TestorderBy { let orders: boolean|string|(boolean|string)[] = true as any; { - let iteratees: (value: string) => any|((value: string) => any)[] = (value) => 1; + let iteratees = (value: string) => 1; let result: string[]; result = _.orderBy('acbd', iteratees); @@ -5710,7 +5710,7 @@ namespace TestorderBy { } { - let iteratees: (value: SampleObject) => any|string|{a: number}|((value: SampleObject) => any|string|{a: number})[] = (value) => 1; + let iteratees = (value: SampleObject) => 1; let result: SampleObject[]; result = _.orderBy<{a: number}, SampleObject>(array, iteratees); @@ -5735,7 +5735,7 @@ namespace TestorderBy { } { - let iteratees: (value: SampleObject) => any|string|{a: number}|((value: SampleObject) => any|string|{a: number})[] = (value) => ""; + let iteratees = (value: SampleObject) => ""; let result: _.LoDashImplicitArrayWrapper; result = _(array).orderBy<{a: number}>(iteratees); @@ -5758,7 +5758,7 @@ namespace TestorderBy { } { - let iteratees: (value: SampleObject) => any|string|{a: number}|((value: SampleObject) => any|string|{a: number})[] = (value) => ""; + let iteratees = (value: SampleObject) => ""; let result: _.LoDashExplicitArrayWrapper; result = _(array).chain().orderBy<{a: number}>(iteratees); From 3b424cc1421d064df896f2d12594d579edb6cab0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Corbi=C3=A8re?= Date: Thu, 30 Nov 2017 11:38:04 +0100 Subject: [PATCH 3/5] Revert "Fixes lint errors in test file." This reverts commit 2428c4197f851444a3708c0ddb43f39e745227c8. --- types/lodash/lodash-tests.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/types/lodash/lodash-tests.ts b/types/lodash/lodash-tests.ts index 7f624ec50c..e00d951023 100644 --- a/types/lodash/lodash-tests.ts +++ b/types/lodash/lodash-tests.ts @@ -5702,7 +5702,7 @@ namespace TestorderBy { let orders: boolean|string|(boolean|string)[] = true as any; { - let iteratees = (value: string) => 1; + let iteratees: (value: string) => any|((value: string) => any)[] = (value) => 1; let result: string[]; result = _.orderBy('acbd', iteratees); @@ -5710,7 +5710,7 @@ namespace TestorderBy { } { - let iteratees = (value: SampleObject) => 1; + let iteratees: (value: SampleObject) => any|string|{a: number}|((value: SampleObject) => any|string|{a: number})[] = (value) => 1; let result: SampleObject[]; result = _.orderBy<{a: number}, SampleObject>(array, iteratees); @@ -5735,7 +5735,7 @@ namespace TestorderBy { } { - let iteratees = (value: SampleObject) => ""; + let iteratees: (value: SampleObject) => any|string|{a: number}|((value: SampleObject) => any|string|{a: number})[] = (value) => ""; let result: _.LoDashImplicitArrayWrapper; result = _(array).orderBy<{a: number}>(iteratees); @@ -5758,7 +5758,7 @@ namespace TestorderBy { } { - let iteratees = (value: SampleObject) => ""; + let iteratees: (value: SampleObject) => any|string|{a: number}|((value: SampleObject) => any|string|{a: number})[] = (value) => ""; let result: _.LoDashExplicitArrayWrapper; result = _(array).chain().orderBy<{a: number}>(iteratees); From c72120d5bc85c91b702de6c6bf13738bc18dff7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Corbi=C3=A8re?= Date: Thu, 30 Nov 2017 12:10:46 +0100 Subject: [PATCH 4/5] Adds missing export for lodash/conformsTo. --- types/lodash/conformsTo.d.ts | 2 ++ types/lodash/tsconfig.json | 1 + 2 files changed, 3 insertions(+) create mode 100644 types/lodash/conformsTo.d.ts diff --git a/types/lodash/conformsTo.d.ts b/types/lodash/conformsTo.d.ts new file mode 100644 index 0000000000..320b1806e0 --- /dev/null +++ b/types/lodash/conformsTo.d.ts @@ -0,0 +1,2 @@ +import { conformsTo } from "./index"; +export = conformsTo; diff --git a/types/lodash/tsconfig.json b/types/lodash/tsconfig.json index 7e2de20632..5a8938d9a2 100644 --- a/types/lodash/tsconfig.json +++ b/types/lodash/tsconfig.json @@ -45,6 +45,7 @@ "cloneWith.d.ts", "compact.d.ts", "concat.d.ts", + "conformsTo.d.ts", "constant.d.ts", "countBy.d.ts", "create.d.ts", From 24664ff23d5a52753385bbbf77d5819688f19e7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Corbi=C3=A8re?= Date: Fri, 1 Dec 2017 09:22:56 +0100 Subject: [PATCH 5/5] Fixes TS configuration. --- types/lodash/tsconfig.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/types/lodash/tsconfig.json b/types/lodash/tsconfig.json index 7eab905857..af6ba5e2e9 100644 --- a/types/lodash/tsconfig.json +++ b/types/lodash/tsconfig.json @@ -6,9 +6,8 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictFunctionTypes": false, - "strictNullChecks": true, "strictFunctionTypes": true, + "strictNullChecks": true, "baseUrl": "../", "typeRoots": [ "../"