OpenCombineJS icon indicating copy to clipboard operation
OpenCombineJS copied to clipboard

Example docs error in function declaration

Open jhoughjr opened this issue 4 years ago • 2 comments

this function def in the example: func fetch(_ url: String) -> JSPromise { JSPromise(jsFetch(url).object!)! }

should be

func fetch(_ url: String) -> JSPromise<JSObject, JSError> { JSPromise(jsFetch(url).object!)! }

Xcode will fix is as <Any,Any> which does not help.

jhoughjr avatar Apr 25 '21 22:04 jhoughjr

Looks like the version of JavaScriptKit you have installed is old — the latest versions no longer have generic parameters.

j-f1 avatar Apr 26 '21 01:04 j-f1

@jhoughjr does updating to JavaScriptKit 0.10.0 resolve the issue for you?

MaxDesiatov avatar Apr 26 '21 10:04 MaxDesiatov