From 7340e976ee376958c7205ea13887d37e047079b6 Mon Sep 17 00:00:00 2001 From: Mathias Date: Thu, 24 Aug 2023 19:52:39 +0200 Subject: [PATCH 1/3] Return the basic type instead of undefined --- src/XrmDefinitelyTyped/CreateTypeScript/CreateFormDts.fs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/XrmDefinitelyTyped/CreateTypeScript/CreateFormDts.fs b/src/XrmDefinitelyTyped/CreateTypeScript/CreateFormDts.fs index 6f4f950182..ac32cd05fa 100644 --- a/src/XrmDefinitelyTyped/CreateTypeScript/CreateFormDts.fs +++ b/src/XrmDefinitelyTyped/CreateTypeScript/CreateFormDts.fs @@ -179,7 +179,7 @@ let getAttributeFuncs (attributes: XrmFormAttribute list) = let defaultFunc = Function.Create("getAttribute", [ Variable.Create("attributeName", TsType.String) ], - TsType.Undefined ) + TsType.Custom("Xrm.Attribute") ) let delegateFunc = Function.Create("getAttribute", @@ -208,7 +208,7 @@ let getControlFuncs (controls: XrmFormControl list) (crmVersion: Version)= let defaultFunc = Function.Create("getControl", [ Variable.Create("controlName", TsType.String) ], - TsType.Undefined) + TsType.Custom("Xrm.BaseControl")) let delegateFunc = Function.Create("getControl", From 88e4ccc8f0a5b01e076f6ff87b51a87f65b15212 Mon Sep 17 00:00:00 2001 From: Mathias Date: Thu, 24 Aug 2023 20:03:00 +0200 Subject: [PATCH 2/3] Change to anycontrol --- src/XrmDefinitelyTyped/CreateTypeScript/CreateFormDts.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/XrmDefinitelyTyped/CreateTypeScript/CreateFormDts.fs b/src/XrmDefinitelyTyped/CreateTypeScript/CreateFormDts.fs index ac32cd05fa..bb2236d9f0 100644 --- a/src/XrmDefinitelyTyped/CreateTypeScript/CreateFormDts.fs +++ b/src/XrmDefinitelyTyped/CreateTypeScript/CreateFormDts.fs @@ -208,7 +208,7 @@ let getControlFuncs (controls: XrmFormControl list) (crmVersion: Version)= let defaultFunc = Function.Create("getControl", [ Variable.Create("controlName", TsType.String) ], - TsType.Custom("Xrm.BaseControl")) + TsType.Custom("Xrm.AnyControl")) let delegateFunc = Function.Create("getControl", From 423e4cba14cb22158b7c574264d20cdb68a00b6d Mon Sep 17 00:00:00 2001 From: Mathias Date: Thu, 24 Aug 2023 20:07:36 +0200 Subject: [PATCH 3/3] defaultType --- src/XrmDefinitelyTyped/CreateTypeScript/CreateFormDts.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/XrmDefinitelyTyped/CreateTypeScript/CreateFormDts.fs b/src/XrmDefinitelyTyped/CreateTypeScript/CreateFormDts.fs index bb2236d9f0..506f113dc4 100644 --- a/src/XrmDefinitelyTyped/CreateTypeScript/CreateFormDts.fs +++ b/src/XrmDefinitelyTyped/CreateTypeScript/CreateFormDts.fs @@ -60,7 +60,7 @@ let getControlInterface cType aType canBeNull = /// Default collection functions which also use the "get" function name. let defaultCollectionFuncs defaultType = [ Function.Create("get", - [ Variable.Create("name", TsType.String) ], TsType.Undefined) + [ Variable.Create("name", TsType.String) ], TsType.Custom defaultType) Function.Create("get", [], TsType.Array (TsType.Custom defaultType)) Function.Create("get",