sitefinitysteve / nativescript-google-analytics

Apache License 2.0
23 stars 14 forks source link

Error in index.d.ts: not a module #6

Closed Metalmate closed 8 years ago

Metalmate commented 8 years ago

Everytime i run my application I recieve the following error:

error TS2656: Exported external package typings file 'PATH/node_modules/nativescript-google-analytics/index.d.ts' is not a module. Please contact the package author to update the package definition.

sitefinitysteve commented 8 years ago

Yeah I'm not sure sorry... I don't use typescript, that was added by someone else... I'm ask some people

sitefinitysteve commented 8 years ago

Fixed by the TS def author, change is on NPM

leocaseiro commented 8 years ago

Only for complement, if you are having issues with TypeScript which will probably give you the error:

error TS2339: Property 'ObjCProtocols' does not exist on type '() => void'.

The easiest fix is implement from:

appDelegate.ObjCProtocols = [UIApplicationDelegate];

to (as any):

(appDelegate as any).ObjCProtocols = [UIApplicationDelegate];

Also, you can add to your reference.d.ts:

declare var UIResponder: any;
declare var UIApplicationDelegate: any;