Join Slack
Powered by
Hey I have an anonymous object structure that I wa...
# getting-started
k
Kevin
12/25/2018, 5:43 AM
Hey I have an anonymous object structure that I want to take as a parameter in a function, what do I put for the type on the parameter?
s
Shawn
12/25/2018, 6:30 AM
An anonymous object structure?
Shawn
12/25/2018, 6:30 AM
it kind of sounds like you want
Any
but that doesn't sound useful
Shawn
12/25/2018, 6:31 AM
if your object generally conforms to a certain shape, you can declare an interface and have these objects implement it
k
Kevin
12/25/2018, 6:52 AM
Thanks, I ended up extracting it into an actual class anyway.
4
Views
Open in Slack
Previous
Next