[go: nahoru, domu]

Skip to content

Commit

Permalink
Fix Typescript compiler issues with TS 2.4.1 (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
laurenzlong committed Jun 29, 2017
1 parent dd9cbef commit dea3fab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/providers/analytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -339,13 +339,13 @@ export class ExportBundleInfo {
}

function copyFieldTo<T, K extends keyof T>(
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<T, K extends keyof T>(from: any, to: T, field: K, transform = _.identity): void {
function copyField<T, K extends keyof T>(from: any, to: T, field: K, transform:(any) => T[K] = _.identity): void {
copyFieldTo(from, to, field, field, transform);
}

Expand Down

0 comments on commit dea3fab

Please sign in to comment.