Skip to content

Instantly share code, notes, and snippets.

@ca0v
Last active January 2, 2016 20:59
Show Gist options
  • Save ca0v/8360116 to your computer and use it in GitHub Desktop.
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:
// 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