do I need my class to implement or extend some spe...
# getting-started
c
do I need my class to implement or extend some specific interface or class to support destructuring?
v
no, just implement
operator fun component1()
as a method or as an extension function
c
what should its return type be?
o
Whatever you need it to be
c
cool thanks
c
thanks, that helps. Also saw the code on
kotlin.text.MatchResult.Destructured
so the name of the methods is key