derekfinlinson / xrm-webapi

Dynamics 365 Web Api TypeScript module
MIT License
27 stars 13 forks source link

Remove unused dependenceis #5

Closed shytikov closed 7 years ago

shytikov commented 7 years ago

It looks like reference to @types/xrm is not actually used anywhere in the code, I believe reference to that module could be removed

Related to #2

shytikov commented 7 years ago

Same interesting situation with es6-promises... When we compile typescript we don't want this library to be referenced, since we're supposed to use resulting JS in a browser. And all browsers (except IE) will already have Promise defined.

I don't know how to solve this one, since there is no conditional compilation in TS...

derekfinlinson commented 7 years ago

The @types/xrm is used to get the client URL for the requests. It's just a reference file and wouldn't be included in any compilation. As for the promise, in my particular use case, I do want it included. I'm using webpack to bundle my form/ribbon scripts so I only have to include one file in the form. There may be a better way to do it so it only uses the bundled Promise if it doesn't already exist in the browser but I haven't found a way to do that yet.