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

Modified getControl, getAttribute and get to return the basic type instead of undefined #294

Open
wants to merge 3 commits into
base: gh_master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/XrmDefinitelyTyped/CreateTypeScript/CreateFormDts.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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<any>") )

let delegateFunc =
Function.Create("getAttribute",
Expand Down Expand Up @@ -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.AnyControl"))

let delegateFunc =
Function.Create("getControl",
Expand Down