From dea3fabbba816a9174b402731d72194cb8908fec Mon Sep 17 00:00:00 2001 From: Lauren Long Date: Thu, 29 Jun 2017 14:37:37 -0400 Subject: [PATCH] Fix Typescript compiler issues with TS 2.4.1 (#65) --- src/providers/analytics.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/providers/analytics.ts b/src/providers/analytics.ts index 1f38b2a3e..5b3425233 100644 --- a/src/providers/analytics.ts +++ b/src/providers/analytics.ts @@ -339,13 +339,13 @@ export class ExportBundleInfo { } function copyFieldTo( - from: any, to: T, fromField: string, toField: K, transform = _.identity): void { + from: any, to: T, fromField: string, toField: K, transform:(any) => T[K] = _.identity): void { if (from[fromField] !== undefined) { to[toField] = transform(from[fromField]); } } -function copyField(from: any, to: T, field: K, transform = _.identity): void { +function copyField(from: any, to: T, field: K, transform:(any) => T[K] = _.identity): void { copyFieldTo(from, to, field, field, transform); }