Morten Holt

Results 9 comments of Morten Holt

It is very strange. It appears that when requesting getValue for an attribute, the context of the request has an influence on the type of the object. If I use...

Since TS 4.0, the `@deprecated` tag is supported https://devblogs.microsoft.com/typescript/announcing-typescript-4-0/#deprecated-support The deprecated type could be an option, allowing the user to choose between compile time warnings and errors.

Agreed with @skovlund, we should not return a valid type for invalid method calls. Would it be a better solution to let them return the `never` type?

@sideshowbob, it seems both `getControl` and `getAttribute` return `null` if the control / attribute is not on the entity. So we could return `null` as a fallback value as well....

@sideshowbob, part of the intention behind the framework is also to provide compile-time safety. I believe you would be able to do a cast if you wish to do something...

It looks like the generated `_Select` type does not specify a type for the postfixed attribute: ![image](https://github.com/delegateas/XrmDefinitelyTyped/assets/4355246/f814235b-f10a-45f5-acfb-7a95ae33eaf0) This may have an influence on your issue, but also makes it impossible...