You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Where contextBuilder is a function that receives some new API that can be used to programmatically build up a wired context (or more likely a promise for one):
functionmyContextBuilder(someNewWireAPI){// Call various methods on someNewWireAPI to create and configure componentsreturn<someopaquerepresentationofthecontextbuiltupbysomeNewWireAPI>;
}
This quite powerful. The current object literal parser could even be built from such an API:
functionobjectLiteralParserContextBuilder(someNewWireAPI){// parse object literal as we do today and call methods on someNewWireAPIreturn<someopaquerepresentationofthecontextbuiltupbysomeNewWireAPI>;
}
Parsers for other formats could be built in the same way, or someone could simply choose to use the programmatic API if they prefer that style.
The object literal parser is currently too entangled in the machinery to make this work in the short term, but I really think this could be a good direction to go after 0.10.0.
Thoughts?
The text was updated successfully, but these errors were encountered:
Decoupling the object-literal spec format from the wire machinery can only be a good thing. Do you have a feel for the impact on plugin authors? Or if this change would make sense before 1.0 vs 2.0?
Imagine an API like:
Where
contextBuilder
is a function that receives some new API that can be used to programmatically build up a wired context (or more likely a promise for one):This quite powerful. The current object literal parser could even be built from such an API:
Parsers for other formats could be built in the same way, or someone could simply choose to use the programmatic API if they prefer that style.
The object literal parser is currently too entangled in the machinery to make this work in the short term, but I really think this could be a good direction to go after 0.10.0.
Thoughts?
The text was updated successfully, but these errors were encountered: