Open adam-fowler opened 4 years ago
@ilyapuchka Is this getting merged in or do I need another approval?
Can we possibly avoid the
Mirror(...).asDictionary()
bit? Stencil already has quite extensive reflection capabilities for multiple types (when rendering a template).
I'll have to have a good look at the code again. It was a wee while ago when I wrote this
Can we possibly avoid the
Mirror(...).asDictionary()
bit? Stencil already has quite extensive reflection capabilities for multiple types (when rendering a template).
@djbe I had a look through the code again. None of the reflection code seems accessible at this point. Is there function that takes an object and converts it to a [String: Any]
somewhere else?
Given Mirror is being used to serialize objects that are members of the Context dictionary, it only seems logical we shouldn't be limited to initializing a Context with a dictionary. This PR adds the ability to initialize a context with Any
Initialize Context with Any by converting to dictionary Allow Any to be pushed onto a Context in a similar way Change Environment functions to use these new functions