Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split xrm.d.ts into a separate package #63

Open
magesoe opened this issue May 31, 2018 · 4 comments
Open

Split xrm.d.ts into a separate package #63

magesoe opened this issue May 31, 2018 · 4 comments

Comments

@magesoe
Copy link
Collaborator

magesoe commented May 31, 2018

Max Ewing has made a blogpost, where he describes a use case for writing typescript that only interfaces with xrm.d.ts. Currently this is done by extracting the generated file and distribute it in some way.

Although this is not the intended way of using XDT, I believe we should support it.

xrm.d.ts is already used separately from the rest of XDT. Therefore it is possible to extract it into a new project and generate a separate package, preferably for each version of the file. This would allow Max Ewing to reference those packages, instead of having to generate it himself.

@pchren
Copy link

pchren commented Jan 28, 2020

Any news about this enhancement?
It would be useful because currently it is a little bit hard to use for example xrm-mock library for testing.

@magesoe
Copy link
Collaborator Author

magesoe commented Jan 28, 2020

There is a problem with directly using the typings from @types/xrm with XrmDefinitelyTyped.

The problem is that XrmDefinitelyTyped does not wish to allow magic strings in getAttribute and getControl, but @types/xrm has to support that. I have not made much effort into splitting up the packages, since it was not an easy fix.

@majblackburn
Copy link

There is a PR submitted this week ((#278)) which allows XrmDT to use a custom namespace (instead of 'Xrm'). While I think the issue here may have other benefits, using a custom namespace avoids the collision between this project and @types/xrm, which I think was a prime motivator for this issue.

@magesoe
Copy link
Collaborator Author

magesoe commented Aug 5, 2022

It seems this issue has been going on for so long that another project has been created that is pure npm and combines types/xrm with XDT :)
https://github.com/OliverFlint/XrmTypesGen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants