odata - Error w/ context initialized from JaySvcUtil-generated model -


upon closer examination file generated .js file built jaysvcutil -- in case called bo_data.d.ts cannot resolve 2 references $data.ipromise. started happening after added new table in database, regenerated .edmx model in visual studio , regenerated entity model jaysvcutil.exe.

declare module wcfservice1 { export class boloentities extends $data.entitycontext { onready(): $data.ipromise; onready(handler: (context: boloentities) => void): $data.ipromise; 

in console see error: typeorname requires value other undefined or null @ line in code:

window['bolo'] = new wcfservice1.boloentities(oproviderconfig); 

thanks in advance!

p.s. did this, didn't help: typescript compile errors jaydata library , jaysvcutil generated code

so seems doing 1 of 2 things described in typescript compile errors jaydata library , jaysvcutil generated code

you must:

1) change jaydata.d.ts

declare module $data {     interface ipromise<t> extends object {         then: {             (handler: (args: t) => void ): ipromise<any>;             (handler: (args: t) => any): ipromise<any>;         };         fail: {             (handler: (args: t) => void ): ipromise<any>;             (handler: (args: t) => any): ipromise<any>;         };        valueof(): any;     } 

to etc etc etc valueof(): object;

and 2) in generated typescript file *.d.ts. change this:

  onready(): $data.ipromise;   onready(handler: (context: boloentities) => void): $data.ipromise; 

to this:

  onready(): $data.ipromise<any>;   onready(handler: (context: boloentities) => void): $data.ipromise<any>; 

where context: own context.


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

visual studio 2010 - Connect to informix database windows form application -

android - Associate same looper with different threads -