mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-10-24 11:50:59 +08:00
Update d3.d.ts
this makes the following possible from typescript:
`var context = canvas.node<HTMLCanvasElement>().getContext('2d');`
alternative to
`var context = (<HtmlCanvasElement>canvas.node()).getContext('2d');`
This commit is contained in:
1 parent
0c4b4ef263
commit
326d9660c0
1 file changed
+1
-1
Vendored
+1
-1
@@ -808,7 +808,7 @@ declare module D3 {
|
||||
* Returns the first non-null element in the current selection. If the selection is empty,
|
||||
* returns null.
|
||||
*/
|
||||
node: () => Element;
|
||||
node: <T extends Element>() => T;
|
||||
}
|
||||
|
||||
export interface EnterSelection {
|
||||
|
||||
Reference in new issue
Block a user