XrmDefinitelyTyped icon indicating copy to clipboard operation
XrmDefinitelyTyped copied to clipboard

181 override xrm namespace

Open misoeli opened this issue 1 year ago • 5 comments

Allow for overriding the Xrm namespace, providing a custom one if needed.

Instead of wrapping Xrm in another namespace level (which would require an additional namespace declaration in both xrm.d.ts AND all version-specific files, simply renaming the namespace keeps the needed changes down.

Still not sure it works. It looked as if VS was acting up post generation, but I would prefer a re-review.

misoeli avatar Jul 18 '22 14:07 misoeli

Fixes #181 .

misoeli avatar Jul 18 '22 14:07 misoeli

@skovlund Looks OK to me after retesting. Most likely just a case of old dependencies. Would like you to have a look though.

misoeli avatar Jul 19 '22 07:07 misoeli

pulling and attempting to compile (although I'm not an F# dev). Thanks SO MUCH for this -- we were a bit stuck on our attempt to bring TDD into a project with XrmDT!

majblackburn avatar Jul 19 '22 15:07 majblackburn

This has resolved our issues with the conflict between @types/xrm and XrmDT. I'd like to suggest "XrmDT" instead of "xrmns" as a default, but I'm in no way complaining! Thanks again!

majblackburn avatar Jul 19 '22 16:07 majblackburn

@misoeli I've looked through the changes and it looks fine. However, I've not tested and therefore have not verified that we have caught every instance of "Xrm".

@majblackburn I'm not entirely sure I understand your suggestion. The namespace still defaults to "Xrm" (for backward compatibility) and not to either "XrmDT" nor "xrmns" (by the way, we usually abbreviate the tool "XDT"). However, "XRMNS" is used internally in code as placeholder text before replacing it with the custom namespace name. If you are referring to the argument "xrmNamespace" given the alternative command "xrmNs" I think this might be better abbreviated to simply "ns".

skovlund avatar Aug 01 '22 08:08 skovlund