Can somebody please explain why this is failing, and how to correct it?
https://travis-ci.org/DefinitelyTyped/DefinitelyTyped/builds/102481354
google.analytics/ga.d.ts(59,22): error TS1110: Type expected. google.analytics/ga.d.ts(64,37): error TS1005: ',' expected. google.analytics/ga.d.ts(64,38): error TS1128: Declaration or statement expected. google.analytics/ga.d.ts(64,39): error TS1128: Declaration or statement expected. It seems that a literal value is acceptable on a function parameter, but not as a restriction on an object field within a function parameter. What's the best way around this?
https://github.com/nalbion/DefinitelyTyped/blob/master/google.analytics/ga.d.ts
declare module UniversalAnalytics { interface ga { // ... // this works: (command: 'send', hitType: 'event', eventCategory: string, eventAction: string, eventLabel?: string, eventValue?: number, fieldsObject?: {}): void; (command: 'send', hitType: 'event', fieldsObject: { eventCategory: string, eventAction: string, eventLabel?: string, eventValue?: number, nonInteraction?: boolean}): void; // but this doesn't (line 58 follows) (command: 'send', fieldsObject: { hitType: 'event', eventCategory: string, eventAction: string, eventLabel?: string, eventValue?: number, nonInteraction?: boolean}): void;