Skip to content

Commit dea3fab

Browse files
authored
Fix Typescript compiler issues with TS 2.4.1 (#65)
1 parent dd9cbef commit dea3fab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/providers/analytics.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -339,13 +339,13 @@ export class ExportBundleInfo {
339339
}
340340

341341
function copyFieldTo<T, K extends keyof T>(
342-
from: any, to: T, fromField: string, toField: K, transform = _.identity): void {
342+
from: any, to: T, fromField: string, toField: K, transform:(any) => T[K] = _.identity): void {
343343
if (from[fromField] !== undefined) {
344344
to[toField] = transform(from[fromField]);
345345
}
346346
}
347347

348-
function copyField<T, K extends keyof T>(from: any, to: T, field: K, transform = _.identity): void {
348+
function copyField<T, K extends keyof T>(from: any, to: T, field: K, transform:(any) => T[K] = _.identity): void {
349349
copyFieldTo(from, to, field, field, transform);
350350
}
351351

0 commit comments

Comments
 (0)