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

Example docs error in function declaration #5

Open
jhoughjr opened this issue Apr 25, 2021 · 2 comments
Open

Example docs error in function declaration #5

jhoughjr opened this issue Apr 25, 2021 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@jhoughjr
Copy link

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.

@j-f1
Copy link
Member

j-f1 commented Apr 26, 2021

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

@MaxDesiatov
Copy link
Contributor

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

@MaxDesiatov MaxDesiatov added the question Further information is requested label Apr 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants