Skip to content

How can I pass an object as an input to a method? #43

@karaggeorge

Description

@karaggeorge

Thank you so much for this project! It's been amazing so far. I'm reading through old issues and learning how to use all the different patterns. This is something I haven't found an example for yet:

I have a struct like:

struct Options {
	let destination: String
	let framesPerSecond: Int
	let cropRect: CGRect?
}

I'd like to expose a function that can take an object from js as input that has this shape, and then somehow type-cast it in Swift to use it as the struct

So I could for example do options.destination

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions