Jaydata - Typescript

201 Views Asked by At

I use jaysvcutil to compile OData $metadata and create JayDataContext.js and it's really awesome but I use Typescript and I don't wanna use import/export syntax in typescript and other third party tools such as requirejs or systemjs ,... jaysvcutil make JayDataContext.d.ts and it's module is only importable in typescript! how can I compile JayDataContext.d.ts and use it's declaration file without import syntax ?

1

There are 1 best solutions below

1
mohammad kamali On

you can use roslyn api to generate code yourself and of course you should create all needed typescript declarations too. as you know you can use reflection to implement this feature but it would be in runtime, but roslyn make u sure to have all generated code in each build.