mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +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:
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