mirror of
https://github.com/chenasraf/DefinitelyTyped.git
synced 2026-05-18 01:49:01 +00:00
[d3-selection] .attr() accepts arrays (#57502)
This commit is contained in:
@@ -49,9 +49,9 @@ const dom = new JSDOM();
|
||||
const svg = select(dom.window.document.body)
|
||||
.append("svg")
|
||||
.attr("id", "gh-dark-mode-only")
|
||||
// @ts-expect-error
|
||||
.attr("viewBox", [0, 0, width, height])
|
||||
.attr("font-family", "sans-serif");
|
||||
// White axes in dark mode.
|
||||
svg.append("style").text(`
|
||||
#gh-dark-mode-only:target {
|
||||
color: #ffffff;
|
||||
|
||||
2
types/d3-selection/index.d.ts
vendored
2
types/d3-selection/index.d.ts
vendored
@@ -390,7 +390,7 @@ export interface Selection<GElement extends BaseType, Datum, PElement extends Ba
|
||||
* The function’s return value is then used to set each element’s attribute.
|
||||
* A null value will remove the specified attribute.
|
||||
*/
|
||||
attr(name: string, value: null | string | number | boolean | ValueFn<GElement, Datum, string | number | boolean | null>): this;
|
||||
attr(name: string, value: null | string | number | boolean | ReadonlyArray<string | number> | ValueFn<GElement, Datum, null | string | number | boolean | ReadonlyArray<string | number>>): this;
|
||||
|
||||
/**
|
||||
* Returns true if and only if the first (non-null) selected element has the specified classes.
|
||||
|
||||
Reference in New Issue
Block a user