Skip to content

How to destructure types #2255

Jun 30, 2023 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

Figured it out 😄

type Something {
    Something(first: Int, second: Int)
}

let Something(first, second) = function_that_returns_something()

Would be nice to mention in the Let bindings page in the Language Tour!

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@lpil
Comment options

@wilkomanger
Comment options

Answer selected by wilkomanger
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants