I have the following function
[@bs.obj]
external route:
(
~_method: string,
~path: string,
~action: list(string) => unit,
~options: Js.t({..})=?,
unit
) =>
_ =
"";
Since functions can be partially applied, I expect to be able to do this:
let get = route(~_method="GET");
but it gives me this error:
This expression's type contains type variables that can't be generalized:
(~path: string, ~action: list(string) => unit, ~options: {_.. }=?,
unit) =>
{. "_method": string, "action": list(string) => unit,
"options": Js.undefined({.. }), "path": string}
What am I doing wrong here?
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)