Last active
January 2, 2016 20:59
-
-
Save ca0v/8360116 to your computer and use it in GitHub Desktop.
Any thoughts on how to do this better? In 0.9.5 this fails because the callback does not return an HTMLElement:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Fails because return value is not HTMLElement | |
query(".symbolBuilderPane").map(node => registry.byNode(node)); | |
//NodeList isn't really an array so this also fails: | |
array.map(query(".symbolBuilderPane"), node => registry.byNode(node)); | |
//No type of node so this fails: | |
array.map(<any>query(".symbolBuilderPane"), node => registry.byNode(node)); | |
// leaving me here: | |
array.map(<any>query(".symbolBuilderPane"), (node: any) => registry.byNode(node)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment