Hi Justin, I see... Not an easy one. Especially when these definitions are used to create the TypeScript definition files, and then TypeScript insists that you have an object, not a string (fortunately in this case, toString() is our friend) :-)
Regards, -- Florent Georges http://fgeorges.org/ http://h2oconsulting.be/ On 26 August 2016 at 17:10, Justin Makeig wrote: > If you look at the XQuery version <https://docs.marklogic.com/ > xdmp:get-request-field>, it returns item()*. This accounts for the cases > where you've got strings zero, one, or many strings in > application/x-www-form-urlencoded or binary in multipart/form-data. > > We're looking at ways to be more precise with how we document JavaScript > types. > > Justin > > -- > Justin Makeig > Director, Product Management > MarkLogic > jmak...@marklogic.com > > On Aug 26, 2016, at 2:23 AM, Florent Georges <li...@fgeorges.org> wrote: > > Hi, > > https://docs.marklogic.com/xdmp.getRequestField tells me that the > function returns "Object?". But "typeof" on the result of calling it (with > a simple "param=value" in the URL) tells me "string". > > Is that a bug in the documentation? Or does the notation "Object?" allows > for a plain string as well? > > Regards, > > -- > Florent Georges > http://fgeorges.org/ > http://h2oconsulting.be/ > > _______________________________________________ > General mailing list > General@developer.marklogic.com > Manage your subscription at: > http://developer.marklogic.com/mailman/listinfo/general > > > > _______________________________________________ > General mailing list > General@developer.marklogic.com > Manage your subscription at: > http://developer.marklogic.com/mailman/listinfo/general > >
_______________________________________________ General mailing list General@developer.marklogic.com Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general