diff --git a/types/d3-brush/index.d.ts b/types/d3-brush/index.d.ts index 644e6c06f7..e3d11d8f11 100644 --- a/types/d3-brush/index.d.ts +++ b/types/d3-brush/index.d.ts @@ -195,21 +195,21 @@ export interface BrushBehavior { * Create a new two-dimensional brush. * * The generic "Datum" refers to the type of the data of the selected svg:g element to - * which the returned BrushBEhavoir will be applied. + * which the returned BrushBehavior will be applied. */ export function brush(): BrushBehavior; /** * Creates a new one-dimensional brush along the x-dimension. * * The generic "Datum" refers to the type of the data of the selected svg:g element to - * which the returned BrushBEhavoir will be applied. + * which the returned BrushBehavior will be applied. */ export function brushX(): BrushBehavior; /** * Creates a new one-dimensional brush along the y-dimension. * * The generic "Datum" refers to the type of the data of the selected svg:g element to - * which the returned BrushBEhavoir will be applied. + * which the returned BrushBehavior will be applied. */ export function brushY(): BrushBehavior; diff --git a/types/d3-chord/d3-chord-tests.ts b/types/d3-chord/d3-chord-tests.ts index b66f39787a..284e307024 100644 --- a/types/d3-chord/d3-chord-tests.ts +++ b/types/d3-chord/d3-chord-tests.ts @@ -180,7 +180,7 @@ canvasRibbon(ribbon); // render ribbon for first chord // The below fails explicitly, as standard ChordSubgroup objects for source and target are missing "radius" property assumed in default // radius accessor. Given the internals of d3 this would lead to a "NaN" radius. So using static typing to raise this to -// awareness seems appropriate. The alternative, is to create RibbonGenerator using the generics to explictly set the types and +// awareness seems appropriate. The alternative, is to create RibbonGenerator using the generics to explicitly set the types and // then set the radius. Or, one could map a radius property into the Chords returned by the ChordLayout. // canvasRibbon(chords[0]); // fails, see above diff --git a/types/d3-chord/index.d.ts b/types/d3-chord/index.d.ts index b4865c962c..176cfe7af8 100644 --- a/types/d3-chord/index.d.ts +++ b/types/d3-chord/index.d.ts @@ -44,7 +44,7 @@ export interface ChordSubgroup { */ export interface Chord { /** - * Chord subgroup constituting the sodurce of Chord + * Chord subgroup constituting the source of Chord */ source: ChordSubgroup; /** @@ -122,7 +122,7 @@ export interface ChordLayout { * * The default is zero. * - * @param angle Pad angle between adjecent groups in radians. + * @param angle Pad angle between adjacent groups in radians. */ padAngle(angle: number): this; @@ -233,7 +233,7 @@ export interface Ribbon { /** * - * A ribbon generator to suport rendering of chords in a chord diagram. + * A ribbon generator to support rendering of chords in a chord diagram. * * The first generic corresponds to the type of the "this" context within which the ribbon generator and its accessor functions will be invoked. * diff --git a/types/d3-collection/index.d.ts b/types/d3-collection/index.d.ts index 5e7973e03b..89ac8d6153 100644 --- a/types/d3-collection/index.d.ts +++ b/types/d3-collection/index.d.ts @@ -7,7 +7,7 @@ // Last module patch version validated against: 1.0.4 /** - * Reference type things that can be coerced to string implicitely + * Reference type things that can be coerced to string implicitly */ export interface Stringifiable { toString(): string; @@ -64,7 +64,7 @@ export function entries(obj: object): Array<{ key: string, value: any }>; // --------------------------------------------------------------------- /** - * A datastructure similar to ES6 Maps, but with a few differences: + * A data structure similar to ES6 Maps, but with a few differences: * - Keys are coerced to strings. * - map.each, not map.forEach. (Also, no thisArg.) * - map.remove, not map.delete. @@ -194,7 +194,7 @@ export function map(obj: object): Map; // --------------------------------------------------------------------- /** - * A datastructure similar to ES6 Sets, but with a few differences: + * A data structure similar to ES6 Sets, but with a few differences: * * - Values are coerced to strings. * - set.each, not set.forEach. (Also, no thisArg.) @@ -282,11 +282,11 @@ export function set(array: T[], key: (value: T, index: number, array: T[]) => // --------------------------------------------------------------------- /** - * A more formal defintion of the nested array returned by Nest.entries(...). This data structure is intended as a reference only. + * A more formal definition of the nested array returned by Nest.entries(...). This data structure is intended as a reference only. * * As the union types cannot be ex ante simplified without knowledge * of the nesting level (number of key(...) operations) and whether the data were rolled-up, this data structure becomes cumbersome - * to use in practice. This is particularly true for discrimiation of array element types. + * to use in practice. This is particularly true for discrimination of array element types. * The use of the rollup function, or lack thereof, also determines whether NestedArray has the 'values' property * with an array of type Datum at leaf level, or has a rolled-up 'value' property. */ @@ -294,7 +294,7 @@ export function set(array: T[], key: (value: T, index: number, array: T[]) => export interface NestedArray extends Array<{ key: string, values: NestedArray | Datum[] | undefined, value: RollupType | undefined }> { } /** - * A more formal defintion of the nested array returned by Nest.map(...). This data structure is intended as a reference only. + * A more formal definition of the nested array returned by Nest.map(...). This data structure is intended as a reference only. * * As the union types cannot be ex ante simplified without knowledge * of the nesting level (number of key(...) operations) and whether the data were rolled-up, this data structure becomes cumbersome @@ -304,7 +304,7 @@ export interface NestedArray extends Array<{ key: string, val export interface NestedMap extends Map | Datum[] | RollupType> { } /** - * A more formal defintion of the nested array returned by Nest.object(...). This data structure is intended as a reference only. + * A more formal definition of the nested array returned by Nest.object(...). This data structure is intended as a reference only. * * As the union types cannot be ex ante simplified without knowledge * of the nesting level (number of key(...) operations) and whether the data were rolled-up, this data structure becomes cumbersome diff --git a/types/d3-drag/d3-drag-tests.ts b/types/d3-drag/d3-drag-tests.ts index 3bc7e6f851..9a8012606b 100644 --- a/types/d3-drag/d3-drag-tests.ts +++ b/types/d3-drag/d3-drag-tests.ts @@ -9,7 +9,7 @@ import * as d3Drag from 'd3-drag'; import { event, select, Selection } from 'd3-selection'; -// NB: Consider alternative approachto getting live event-binding +// NB: Consider alternative approach to getting live event-binding // when using webpack as suggested by @ocombe in response to // event binding question https://github.com/d3/d3-zoom/issues/32#issuecomment-229889310 // d3.getEvent = () => require("d3-selection").event; @@ -234,7 +234,7 @@ const sourceEvent: any = e.sourceEvent; // As always, the below tests are for signature only, no functional purpose // remove event listeners for a given event type -e = e.on('start.tmp', null); // chainability test through reassigment +e = e.on('start.tmp', null); // chainability test through reassignment e = e.on('drag', dragged); // e = e.on('drag', wrongDragHandler1); // fails, wrong datum type in handler diff --git a/types/d3-drag/index.d.ts b/types/d3-drag/index.d.ts index b930081d15..9aa1ccf8d2 100644 --- a/types/d3-drag/index.d.ts +++ b/types/d3-drag/index.d.ts @@ -199,7 +199,7 @@ export interface DragBehavior; * @param csvString A string, which must be in the comma-separated values format. * @param row A row conversion function which is invoked for each row, being passed an object representing the current row (d), * the index (i) starting at zero for the first non-header row, and the array of column names. If the returned value is null or undefined, - * the row is skipped and will be ommitted from the array returned by dsv.parse; otherwise, the returned value defines the corresponding row object. + * the row is skipped and will be omitted from the array returned by dsv.parse; otherwise, the returned value defines the corresponding row object. * In effect, row is similar to applying a map and filter operator to the returned rows. */ export function csvParse( @@ -102,7 +102,7 @@ export function csvParseRows(csvString: string): string[][]; * @param csvString A string, which must be in the comma-separated values format. * @param row A row conversion function which is invoked for each row, being passed an array representing the current row (d), the index (i) * starting at zero for the first row, and the array of column names. If the returned value is null or undefined, - * the row is skipped and will be ommitted from the array returned by dsv.parse; otherwise, the returned value defines the corresponding row object. + * the row is skipped and will be omitted from the array returned by dsv.parse; otherwise, the returned value defines the corresponding row object. * In effect, row is similar to applying a map and filter operator to the returned rows. */ export function csvParseRows( @@ -177,7 +177,7 @@ export function tsvParse(tsvString: string): DSVParsedArray; * @param tsvString A string, which must be in the tab-separated values format. * @param row A row conversion function which is invoked for each row, being passed an object representing the current row (d), * the index (i) starting at zero for the first non-header row, and the array of column names. If the returned value is null or undefined, - * the row is skipped and will be ommitted from the array returned by dsv.parse; otherwise, the returned value defines the corresponding row object. + * the row is skipped and will be omitted from the array returned by dsv.parse; otherwise, the returned value defines the corresponding row object. * In effect, row is similar to applying a map and filter operator to the returned rows. */ export function tsvParse( @@ -212,7 +212,7 @@ export function tsvParseRows(tsvString: string): string[][]; * @param tsvString A string, which must be in the tab-separated values format. * @param row A row conversion function which is invoked for each row, being passed an array representing the current row (d), the index (i) * starting at zero for the first row, and the array of column names. If the returned value is null or undefined, - * the row is skipped and will be ommitted from the array returned by dsv.parse; otherwise, the returned value defines the corresponding row object. + * the row is skipped and will be omitted from the array returned by dsv.parse; otherwise, the returned value defines the corresponding row object. * In effect, row is similar to applying a map and filter operator to the returned rows. */ export function tsvParseRows( @@ -285,7 +285,7 @@ export interface DSV { * @param dsvString A string, which must be in the delimiter-separated values format with the appropriate delimiter. * @param row A row conversion function which is invoked for each row, being passed an object representing the current row (d), * the index (i) starting at zero for the first non-header row, and the array of column names. If the returned value is null or undefined, - * the row is skipped and will be ommitted from the array returned by dsv.parse; otherwise, the returned value defines the corresponding row object. + * the row is skipped and will be omitted from the array returned by dsv.parse; otherwise, the returned value defines the corresponding row object. * In effect, row is similar to applying a map and filter operator to the returned rows. */ parse( @@ -314,7 +314,7 @@ export interface DSV { * @param dsvString A string, which must be in the delimiter-separated values format with the appropriate delimiter. * @param row A row conversion function which is invoked for each row, being passed an array representing the current row (d), the index (i) * starting at zero for the first row, and the array of column names. If the returned value is null or undefined, - * the row is skipped and will be ommitted from the array returned by dsv.parse; otherwise, the returned value defines the corresponding row object. + * the row is skipped and will be omitted from the array returned by dsv.parse; otherwise, the returned value defines the corresponding row object. * In effect, row is similar to applying a map and filter operator to the returned rows. */ parseRows( diff --git a/types/d3-dsv/v0/index.d.ts b/types/d3-dsv/v0/index.d.ts index 18701f64ea..94ddbef579 100644 --- a/types/d3-dsv/v0/index.d.ts +++ b/types/d3-dsv/v0/index.d.ts @@ -5,7 +5,7 @@ /** A parser and formatter for DSV (CSV and TSV) files. Extracted from D3. */ declare function loader( - /** the symbol used to seperate cells in the row. */ + /** the symbol used to separate cells in the row. */ delimiter: string, /** example: "text/plain" */ encoding?: string): D3Dsv; diff --git a/types/d3-fetch/index.d.ts b/types/d3-fetch/index.d.ts index 6e31d70a76..25343d1bf5 100644 --- a/types/d3-fetch/index.d.ts +++ b/types/d3-fetch/index.d.ts @@ -52,7 +52,7 @@ export function csv( * @param url A valid URL string. * @param row A row conversion function which is invoked for each row, being passed an object representing the current row (d), * the index (i) starting at zero for the first non-header row, and the array of column names. If the returned value is null or undefined, - * the row is skipped and will be ommitted from the array returned by dsv.csvParse; otherwise, the returned value defines the corresponding row object. + * the row is skipped and will be omitted from the array returned by dsv.csvParse; otherwise, the returned value defines the corresponding row object. * In effect, row is similar to applying a map and filter operator to the returned rows. */ export function csv( @@ -74,7 +74,7 @@ export function csv( * @param init An request initialization object. * @param row A row conversion function which is invoked for each row, being passed an object representing the current row (d), * the index (i) starting at zero for the first non-header row, and the array of column names. If the returned value is null or undefined, - * the row is skipped and will be ommitted from the array returned by dsv.csvParse; otherwise, the returned value defines the corresponding row object. + * the row is skipped and will be omitted from the array returned by dsv.csvParse; otherwise, the returned value defines the corresponding row object. * In effect, row is similar to applying a map and filter operator to the returned rows. */ export function csv( @@ -112,7 +112,7 @@ export function dsv( * @param url A valid URL string. * @param row A row conversion function which is invoked for each row, being passed an object representing the current row (d), * the index (i) starting at zero for the first non-header row, and the array of column names. If the returned value is null or undefined, - * the row is skipped and will be ommitted from the array returned by dsv.parse; otherwise, the returned value defines the corresponding row object. + * the row is skipped and will be omitted from the array returned by dsv.parse; otherwise, the returned value defines the corresponding row object. * In effect, row is similar to applying a map and filter operator to the returned rows. */ export function dsv( @@ -136,7 +136,7 @@ export function dsv( * @param init An request initialization object. * @param row A row conversion function which is invoked for each row, being passed an object representing the current row (d), * the index (i) starting at zero for the first non-header row, and the array of column names. If the returned value is null or undefined, - * the row is skipped and will be ommitted from the array returned by dsv.parse; otherwise, the returned value defines the corresponding row object. + * the row is skipped and will be omitted from the array returned by dsv.parse; otherwise, the returned value defines the corresponding row object. * In effect, row is similar to applying a map and filter operator to the returned rows. */ export function dsv( @@ -224,7 +224,7 @@ export function tsv( * @param url A valid URL string. * @param row A row conversion function which is invoked for each row, being passed an object representing the current row (d), * the index (i) starting at zero for the first non-header row, and the array of column names. If the returned value is null or undefined, - * the row is skipped and will be ommitted from the array returned by dsv.tsvParse; otherwise, the returned value defines the corresponding row object. + * the row is skipped and will be omitted from the array returned by dsv.tsvParse; otherwise, the returned value defines the corresponding row object. * In effect, row is similar to applying a map and filter operator to the returned rows. */ export function tsv( @@ -246,7 +246,7 @@ export function tsv( * @param init An request initialization object. * @param row A row conversion function which is invoked for each row, being passed an object representing the current row (d), * the index (i) starting at zero for the first non-header row, and the array of column names. If the returned value is null or undefined, - * the row is skipped and will be ommitted from the array returned by dsv.tsvParse; otherwise, the returned value defines the corresponding row object. + * the row is skipped and will be omitted from the array returned by dsv.tsvParse; otherwise, the returned value defines the corresponding row object. * In effect, row is similar to applying a map and filter operator to the returned rows. */ export function tsv( diff --git a/types/d3-force/index.d.ts b/types/d3-force/index.d.ts index 1736a1ac78..35f4d06657 100644 --- a/types/d3-force/index.d.ts +++ b/types/d3-force/index.d.ts @@ -55,7 +55,7 @@ export interface SimulationNodeDatum { /** * The base data structure for the datum of a Simulation Link, as used by ForceLink. * The optional properties contained in this data structure are internally assigned - * by when initializating with ForceLink.links(...) + * by when initializing with ForceLink.links(...) * * * IMPORTANT: The source and target properties may be internally mutated in type during the @@ -634,7 +634,7 @@ export interface ForceLink number; /** - * Set the strenght accessor to use the specified constant number for all links, + * Set the strength accessor to use the specified constant number for all links, * re-evaluates the strength accessor for each link, and returns this force. * * The constant is internally wrapped into a strength accessor function. @@ -647,7 +647,7 @@ export interface ForceLink(); -// geoPathConicProjection = geoPathSVG.projection(); // fails without casting to GeoConicProjection, or alternatively custom typeguard +// geoPathConicProjection = geoPathSVG.projection(); // fails without casting to GeoConicProjection, or alternatively custom type guard // geoPathConicProjection = geoPathSVG.projection(); // fails as SampleProperties does not extend minimal interface // context(...) ------------------------------------------------------ @@ -719,11 +719,11 @@ const context: d3Geo.GeoContext = { const transformFunction: { stream(s: d3Geo.GeoStream): {} } = d3Geo.geoTransform({}); -interface CustomTranformProto extends d3Geo.GeoTransformPrototype { +interface CustomTransformProto extends d3Geo.GeoTransformPrototype { a: number; } -let customTransformProto: CustomTranformProto; +let customTransformProto: CustomTransformProto; customTransformProto = { point(x, y) { @@ -732,11 +732,11 @@ customTransformProto = { a: 10 }; -const t: { stream(s: d3Geo.GeoStream): CustomTranformProto & d3Geo.GeoStream } = d3Geo.geoTransform(customTransformProto); +const t: { stream(s: d3Geo.GeoStream): CustomTransformProto & d3Geo.GeoStream } = d3Geo.geoTransform(customTransformProto); // geoIdentity() ======================================================== -let identityTransform: d3Geo.GeoIdentityTranform; +let identityTransform: d3Geo.GeoIdentityTransform; identityTransform = d3Geo.geoIdentity(); diff --git a/types/d3-geo/index.d.ts b/types/d3-geo/index.d.ts index a41f67618a..d1e45090c0 100644 --- a/types/d3-geo/index.d.ts +++ b/types/d3-geo/index.d.ts @@ -976,7 +976,7 @@ export interface GeoConicProjection extends GeoProjection { export interface GeoContext { /** * Adds an arc to the path with center point (x, y) and radius r starting at startAngle and ending at endAngle. - * The arc is drawn in clockwise directio by default. + * The arc is drawn in clockwise direction by default. * * @param x x-coordinate of arc center point. * @param y y-coordinate of arc center point. @@ -1046,7 +1046,7 @@ export interface GeoPath(methods: T): { str // geoIdentity() ================================================================= +/** + * @deprecated Misspelled name. Use GeoIdentityTransform. + */ +export type GeoIdentityTranform = GeoIdentityTransform; + /** * Geo Identity Transform */ -export interface GeoIdentityTranform extends GeoStreamWrapper { +export interface GeoIdentityTransform extends GeoStreamWrapper { /** * Returns the current viewport clip extent which defaults to null. */ @@ -1667,7 +1672,7 @@ export interface GeoIdentityTranform extends GeoStreamWrapper { /** * Returns the identity transform which can be used to scale, translate and clip planar geometry. */ -export function geoIdentity(): GeoIdentityTranform; +export function geoIdentity(): GeoIdentityTransform; // ---------------------------------------------------------------------- // Clipping Functions diff --git a/types/d3-hierarchy/d3-hierarchy-tests.ts b/types/d3-hierarchy/d3-hierarchy-tests.ts index 4e35f02ff9..65b1f5c392 100644 --- a/types/d3-hierarchy/d3-hierarchy-tests.ts +++ b/types/d3-hierarchy/d3-hierarchy-tests.ts @@ -568,7 +568,7 @@ hierarchyRectangularNode = rectangularNodeDescendants[rectangularNodeDescendants const treemapPath: Array> = treemapRootNode.path(hierarchyRectangularNode); -// links() and HierarchyRectangulerLink<...> ------------------------------------------ +// links() and HierarchyRectangularLink<...> ------------------------------------------ let rectangularLinks: Array>; @@ -747,7 +747,7 @@ hierarchyCircularNode = circularNodeDescendants[circularNodeDescendants.length - const packPath: Array> = packRootNode.path(hierarchyCircularNode); -// links() and HierarchyRectangulerLink<...> ------------------------------------------ +// links() and HierarchyRectangularLink<...> ------------------------------------------ let circularLinks: Array>; diff --git a/types/d3-hierarchy/index.d.ts b/types/d3-hierarchy/index.d.ts index a72dfa0aba..440a779217 100644 --- a/types/d3-hierarchy/index.d.ts +++ b/types/d3-hierarchy/index.d.ts @@ -50,7 +50,7 @@ export function hierarchy(data: Datum, children?: (d: Datum) => (Datum[] // Stratify // ----------------------------------------------------------------------- -// TODO: Review the comment in the API documentation related to 'reserved properties': id, parentId, children. If this is refering to the element on node, it should be 'parent'? +// TODO: Review the comment in the API documentation related to 'reserved properties': id, parentId, children. If this is referring to the element on node, it should be 'parent'? export interface StratifyOperator { (data: Datum[]): HierarchyNode; diff --git a/types/d3-hsv/d3-hsv-tests.ts b/types/d3-hsv/d3-hsv-tests.ts index 7aa6fb7817..780f584c7c 100644 --- a/types/d3-hsv/d3-hsv-tests.ts +++ b/types/d3-hsv/d3-hsv-tests.ts @@ -51,7 +51,7 @@ cString = cHSV.toString(); console.log('Channels = (h : %d, s: %d, v: %d)', cHSV.h, cHSV.s, cHSV.v); console.log('Opacity = %d', cHSV.opacity); -// Interpolater +// Interpolator iString = interpolateHsv('seagreen', 'steelblue'); iString = interpolateHsv(rgb('seagreen'), hcl('steelblue')); @@ -61,7 +61,7 @@ iString = interpolateHsvLong('seagreen', 'steelblue'); iString = interpolateHsvLong(rgb('seagreen'), hcl('steelblue')); iString = interpolateHsvLong(rgb('seagreen'), hsv('steelblue')); -// Prototype, instanceof and typeguard +// Prototype, instanceof and type guard declare let color: RGBColor | HSVColor | null; diff --git a/types/d3-interpolate/d3-interpolate-tests.ts b/types/d3-interpolate/d3-interpolate-tests.ts index 6baaf06092..e88ad79cfe 100644 --- a/types/d3-interpolate/d3-interpolate-tests.ts +++ b/types/d3-interpolate/d3-interpolate-tests.ts @@ -123,7 +123,7 @@ arrNum = iArrayNum(0.5); iArrayStr = d3Interpolate.interpolateArray(['1', '2'], ['4', '8']); // explicit typing arrStr = iArrayStr(0.5); -iArrayStr = d3Interpolate.interpolateArray([1, 2], ['4', '8']); // infered typing +iArrayStr = d3Interpolate.interpolateArray([1, 2], ['4', '8']); // inferred typing arrStr = iArrayStr(0.5); // two element array with first element date and second element string @@ -156,7 +156,7 @@ console.log('Recommended transition duration = %d', iZoom.duration); // test quantize(interpolator, n) signature ------------------------------------------------ -arrNum = d3Interpolate.quantize(d3Interpolate.interpolateRound(-1, 2), 4); // infered template parameter type +arrNum = d3Interpolate.quantize(d3Interpolate.interpolateRound(-1, 2), 4); // inferred template parameter type arrStr = d3Interpolate.quantize(d3Interpolate.interpolateString('-1', '2'), 4); // explicit template parameter typing // arrStr = d3Interpolate.quantize(d3Interpolate.interpolateRound(-1, 2), 4); // test fails, due to explicit typing v argument type mismatch diff --git a/types/d3-path/index.d.ts b/types/d3-path/index.d.ts index 7c0f662018..4c1f124962 100644 --- a/types/d3-path/index.d.ts +++ b/types/d3-path/index.d.ts @@ -95,7 +95,7 @@ export interface Path { rect(x: number, y: number, w: number, h: number): void; /** - * Returns the string representation of this path according to SVG’s path data specficiation. + * Returns the string representation of this path according to SVG’s path data specification. */ toString(): string; } diff --git a/types/d3-queue/d3-queue-tests.ts b/types/d3-queue/d3-queue-tests.ts index f387ea990a..08c195d9bd 100644 --- a/types/d3-queue/d3-queue-tests.ts +++ b/types/d3-queue/d3-queue-tests.ts @@ -38,7 +38,7 @@ qNoResult = qNoResult.defer(delayedHello, 'Alice', 250); qNoResult.defer(delayedHello, 'Bob', 500); -// Task with Reuslts ------------------------------------------------- +// Task with Results ------------------------------------------------- function getFileStats(path: string, callback: (error: any | null, stats?: any) => void) { // magically get file stats and behave like fs.stat when invoking the callback @@ -57,7 +57,7 @@ qNoResult = qNoResult.await((error) => { console.log('Goodbye!'); }); -// Task with Reuslts ------------------------------------------------- +// Task with Results ------------------------------------------------- // await qWithResults diff --git a/types/d3-queue/index.d.ts b/types/d3-queue/index.d.ts index d672849622..5ad38d8d74 100644 --- a/types/d3-queue/index.d.ts +++ b/types/d3-queue/index.d.ts @@ -29,7 +29,7 @@ export interface Queue { /** * Sets the callback to be invoked when all deferred tasks have finished (individual result arguments). * - * @param callback Callback function to be executed, when error occured or all deferred tasks + * @param callback Callback function to be executed, when error occurred or all deferred tasks * have completed. The first argument to the callback is the first error that occurred, or null if no error occurred. * If an error occurred, there are no additional arguments to the callback. Otherwise, * the callback is passed each result as an additional argument. @@ -38,7 +38,7 @@ export interface Queue { /** * Sets the callback to be invoked when all deferred tasks have finished (results array). * - * @param callback Callback function to be executed, when error occured or all deferred tasks + * @param callback Callback function to be executed, when error occurred or all deferred tasks * have completed. The first argument to the callback is the first error that occurred, * or null if no error occurred. If an error occurred, there are no additional arguments to the callback. * Otherwise, the callback is also passed an array of results as the second argument. diff --git a/types/d3-random/index.d.ts b/types/d3-random/index.d.ts index 41b6034215..c6335a694b 100644 --- a/types/d3-random/index.d.ts +++ b/types/d3-random/index.d.ts @@ -57,7 +57,7 @@ export const randomNormal: RandomNormal; */ export interface RandomLogNormal extends RandomNumberGenerationSource { /** - * Returns a function for generating random numbers with a log-normal distribution. The expected value of the random variable’s natural logrithm is mu, + * Returns a function for generating random numbers with a log-normal distribution. The expected value of the random variable’s natural logarithm is mu, * with the given standard deviation sigma. If mu is not specified, it defaults to 0; if sigma is not specified, it defaults to 1. * * @param mu Expected value, defaults to 0. diff --git a/types/d3-sankey/index.d.ts b/types/d3-sankey/index.d.ts index 237eb60f15..c619b5c8c3 100644 --- a/types/d3-sankey/index.d.ts +++ b/types/d3-sankey/index.d.ts @@ -333,7 +333,7 @@ export interface SankeyLayout { @@ -180,7 +180,7 @@ export interface ScaleContinuousNumeric { * * The second generic corresponds to the data type of the output elements generated by the scale. * - * If range element and output element type differ, the interpolator factory used with the scale must match this behaviour and + * If range element and output element type differ, the interpolator factory used with the scale must match this behavior and * convert the interpolated range element to a corresponding output element. */ export interface ScaleLinear extends ScaleContinuousNumeric { @@ -197,9 +197,9 @@ export interface ScaleLinear extends ScaleContinuousNumeric): this; /** @@ -210,11 +210,11 @@ export interface ScaleLinear extends ScaleContinuousNumeric(interpolate: InterpolatorFactory): ScaleLinear; } @@ -228,9 +228,9 @@ export function scaleLinear(): ScaleLinear; /** * Constructs a new continuous linear scale with the unit domain [0, 1], the default interpolator and clamping disabled. * - * The generic correponds to the data type of the range and output elements to be used. + * The generic corresponds to the data type of the range and output elements to be used. * - * As range type and output type are the same, the interpolator factory used with the scale must match this behaviour. + * As range type and output type are the same, the interpolator factory used with the scale must match this behavior. * The range must be set in accordance with the range element type. * * The interpolator factory may be set using the interpolate(...) method of the scale. @@ -242,7 +242,7 @@ export function scaleLinear(): ScaleLinear; * The first generic corresponds to the data type of the range elements. * The second generic corresponds to the data type of the output elements generated by the scale. * - * If range element and output element type differ, the interpolator factory used with the scale must match this behaviour and + * If range element and output element type differ, the interpolator factory used with the scale must match this behavior and * convert the interpolated range element to a corresponding output element. * * The range must be set in accordance with the range element type. @@ -271,7 +271,7 @@ export function scaleLinear(): ScaleLinear; * * The second generic corresponds to the data type of the output elements generated by the scale. * - * If range element and output element type differ, the interpolator factory used with the scale must match this behaviour and + * If range element and output element type differ, the interpolator factory used with the scale must match this behavior and * convert the interpolated range element to a corresponding output element. */ export interface ScalePower extends ScaleContinuousNumeric { @@ -288,9 +288,9 @@ export interface ScalePower extends ScaleContinuousNumeric): this; /** @@ -301,11 +301,11 @@ export interface ScalePower extends ScaleContinuousNumeric(interpolate: InterpolatorFactory): ScalePower; @@ -332,9 +332,9 @@ export function scalePow(): ScalePower; * Constructs a new continuous power scale with the unit domain [0, 1], the exponent 1, the default interpolator and clamping disabled. * (Note that this is effectively a linear scale until you set a different exponent.) * - * The generic correponds to the data type of the range and output elements to be used. + * The generic corresponds to the data type of the range and output elements to be used. * - * As range type and output type are the same, the interpolator factory used with the scale must match this behaviour. + * As range type and output type are the same, the interpolator factory used with the scale must match this behavior. * * The range must be set in accordance with the range element type. * @@ -348,7 +348,7 @@ export function scalePow(): ScalePower; * The first generic corresponds to the data type of the range elements. * The second generic corresponds to the data type of the output elements generated by the scale. * - * If range element and output element type differ, the interpolator factory used with the scale must match this behaviour and + * If range element and output element type differ, the interpolator factory used with the scale must match this behavior and * convert the interpolated range element to a corresponding output element. * * The range must be set in accordance with the range element type. @@ -368,9 +368,9 @@ export function scaleSqrt(): ScalePower; * Constructs a new continuous power scale with the unit domain [0, 1], the exponent 0.5, the default interpolator and clamping disabled. * This is a convenience method equivalent to d3.scalePow().exponent(0.5). * - * The generic correponds to the data type of the range and output elements to be used. + * The generic corresponds to the data type of the range and output elements to be used. * - * As range type and output type are the same, the interpolator factory used with the scale must match this behaviour. + * As range type and output type are the same, the interpolator factory used with the scale must match this behavior. * * The range must be set in accordance with the range element type. * @@ -384,7 +384,7 @@ export function scaleSqrt(): ScalePower; * The first generic corresponds to the data type of the range elements. * The second generic corresponds to the data type of the output elements generated by the scale. * - * If range element and output element type differ, the interpolator factory used with the scale must match this behaviour and + * If range element and output element type differ, the interpolator factory used with the scale must match this behavior and * convert the interpolated range element to a corresponding output element. * * The range must be set in accordance with the range element type. @@ -417,7 +417,7 @@ export function scaleSqrt(): ScalePower; * * The second generic corresponds to the data type of the output elements generated by the scale. * - * If range element and output element type differ, the interpolator factory used with the scale must match this behaviour and + * If range element and output element type differ, the interpolator factory used with the scale must match this behavior and * convert the interpolated range element to a corresponding output element. */ export interface ScaleLogarithmic extends ScaleContinuousNumeric { @@ -456,9 +456,9 @@ export interface ScaleLogarithmic extends ScaleContinuousNumeric< * If the scale is used to set an attribute or style, this is typically acceptable (and desirable for performance); * however, if you need to store the scale’s return value, you must specify your own interpolator or make a copy as appropriate. * - * As part of the interpolation process the interpotaled value from the range may be converted to a corresponding output value. + * As part of the interpolation process the interpolated value from the range may be converted to a corresponding output value. * - * @param interpolate An interpolation factory. The generics for Range and Output of the scale must correpond to the interpolation factory applied to the scale. + * @param interpolate An interpolation factory. The generics for Range and Output of the scale must correspond to the interpolation factory applied to the scale. */ interpolate(interpolate: InterpolatorFactory): this; /** @@ -469,11 +469,11 @@ export interface ScaleLogarithmic extends ScaleContinuousNumeric< * If the scale is used to set an attribute or style, this is typically acceptable (and desirable for performance); * however, if you need to store the scale’s return value, you must specify your own interpolator or make a copy as appropriate. * - * As part of the interpolation process the interpotaled value from the range may be converted to a corresponding output value. + * As part of the interpolation process the interpolated value from the range may be converted to a corresponding output value. * * The generic "NewOutput" can be used to change the scale to have a different output element type corresponding to the new interpolation factory. * - * @param interpolate An interpolation factory. The generics for Range and Output of the scale must correpond to the interpolation factory applied to the scale. + * @param interpolate An interpolation factory. The generics for Range and Output of the scale must correspond to the interpolation factory applied to the scale. */ interpolate(interpolate: InterpolatorFactory): ScaleLogarithmic; @@ -537,9 +537,9 @@ export function scaleLog(): ScaleLogarithmic; /** * Constructs a new continuous logarithmic scale with the domain [1, 10], the base 10, the default interpolator and clamping disabled. * - * The generic correponds to the data type of the range and output elements to be used. + * The generic corresponds to the data type of the range and output elements to be used. * - * As range type and output type are the same, the interpolator factory used with the scale must match this behaviour. + * As range type and output type are the same, the interpolator factory used with the scale must match this behavior. * * The range must be set in accordance with the range element type. * @@ -552,7 +552,7 @@ export function scaleLog(): ScaleLogarithmic; * The first generic corresponds to the data type of the range elements. * The second generic corresponds to the data type of the output elements generated by the scale. * - * If range element and output element type differ, the interpolator factory used with the scale must match this behaviour and + * If range element and output element type differ, the interpolator factory used with the scale must match this behavior and * convert the interpolated range element to a corresponding output element. * * The range must be set in accordance with the range element type. @@ -696,7 +696,7 @@ export function scaleIdentity(): ScaleIdentity; * * The second generic corresponds to the data type of the output elements generated by the scale. * - * If range element and output element type differ, the interpolator factory used with the scale must match this behaviour and + * If range element and output element type differ, the interpolator factory used with the scale must match this behavior and * convert the interpolated range element to a corresponding output element. */ export interface ScaleTime { @@ -798,9 +798,9 @@ export interface ScaleTime { * If the scale is used to set an attribute or style, this is typically acceptable (and desirable for performance); * however, if you need to store the scale’s return value, you must specify your own interpolator or make a copy as appropriate. * - * As part of the interpolation process the interpotaled value from the range may be converted to a corresponding output value. + * As part of the interpolation process the interpolated value from the range may be converted to a corresponding output value. * - * @param interpolate An interpolation factory. The generics for Range and Output of the scale must correpond to the interpolation factory applied to the scale. + * @param interpolate An interpolation factory. The generics for Range and Output of the scale must correspond to the interpolation factory applied to the scale. */ interpolate(interpolate: InterpolatorFactory): this; /** @@ -811,11 +811,11 @@ export interface ScaleTime { * If the scale is used to set an attribute or style, this is typically acceptable (and desirable for performance); * however, if you need to store the scale’s return value, you must specify your own interpolator or make a copy as appropriate. * - * As part of the interpolation process the interpotaled value from the range may be converted to a corresponding output value. + * As part of the interpolation process the interpolated value from the range may be converted to a corresponding output value. * * The generic "NewOutput" can be used to change the scale to have a different output element type corresponding to the new interpolation factory. * - * @param interpolate An interpolation factory. The generics for Range and Output of the scale must correpond to the interpolation factory applied to the scale. + * @param interpolate An interpolation factory. The generics for Range and Output of the scale must correspond to the interpolation factory applied to the scale. */ interpolate(interpolate: InterpolatorFactory): ScaleTime; @@ -942,9 +942,9 @@ export function scaleTime(): ScaleTime; /** * Constructs a new time scale using local time with the domain [2000-01-01, 2000-01-02], the default interpolator and clamping disabled. * - * The generic correponds to the data type of the range and output elements to be used. + * The generic corresponds to the data type of the range and output elements to be used. * - * As range type and output type are the same, the interpolator factory used with the scale must match this behaviour. + * As range type and output type are the same, the interpolator factory used with the scale must match this behavior. * * The range must be set in accordance with the range element type. * @@ -957,7 +957,7 @@ export function scaleTime(): ScaleTime; * The first generic corresponds to the data type of the range elements. * The second generic corresponds to the data type of the output elements generated by the scale. * - * If range element and output element type differ, the interpolator factory used with the scale must match this behaviour and + * If range element and output element type differ, the interpolator factory used with the scale must match this behavior and * convert the interpolated range element to a corresponding output element. * * The range must be set in accordance with the range element type. @@ -975,9 +975,9 @@ export function scaleUtc(): ScaleTime; /** * Constructs a new time scale using Coordinated Universal Time (UTC) with the domain [2000-01-01, 2000-01-02], the default interpolator and clamping disabled. * - * The generic correponds to the data type of the range and output elements to be used. + * The generic corresponds to the data type of the range and output elements to be used. * - * As range type and output type are the same, the interpolator factory used with the scale must match this behaviour. + * As range type and output type are the same, the interpolator factory used with the scale must match this behavior. * * The range must be set in accordance with the range element type. * @@ -990,7 +990,7 @@ export function scaleUtc(): ScaleTime; * The first generic corresponds to the data type of the range elements. * The second generic corresponds to the data type of the output elements generated by the scale. * - * If range element and output element type differ, the interpolator factory used with the scale must match this behaviour and + * If range element and output element type differ, the interpolator factory used with the scale must match this behavior and * convert the interpolated range element to a corresponding output element. * * The range must be set in accordance with the range element type. @@ -1202,7 +1202,7 @@ export function scaleQuantize(): ScaleQuantize; * The number of values in (the cardinality of) the output range determines the number of quantiles that will be computed from the domain. * To compute the quantiles, the domain is sorted, and treated as a population of discrete values; see d3-array’s quantile. * - * The generic correponds to the data type of range elements. + * The generic corresponds to the data type of range elements. */ export interface ScaleQuantile { /** @@ -1272,7 +1272,7 @@ export function scaleQuantile(): ScaleQuantile; * Constructs a new quantile scale with an empty domain and an empty range. * The quantile scale is invalid until both a domain and range are specified. * - * The generic correponds to the data type of range elements. + * The generic corresponds to the data type of range elements. */ export function scaleQuantile(): ScaleQuantile; @@ -1613,7 +1613,7 @@ export function scaleBand(): ScaleBand; /** * Constructs a new band scale with the empty domain, the unit range [0, 1], no padding, no rounding and center alignment. * - * The generic correponds to the data type of domain elements. + * The generic corresponds to the data type of domain elements. */ export function scaleBand(): ScaleBand; diff --git a/types/d3-scale/v1/index.d.ts b/types/d3-scale/v1/index.d.ts index a9843d9547..46fe6c2a12 100644 --- a/types/d3-scale/v1/index.d.ts +++ b/types/d3-scale/v1/index.d.ts @@ -14,7 +14,7 @@ import { CountableTimeInterval, TimeInterval } from 'd3-time'; /** * An Interpolator factory returns an interpolator function. * - * The first generic correponds to the data type of the interpolation boundaries. + * The first generic corresponds to the data type of the interpolation boundaries. * The second generic corresponds to the data type of the return type of the interpolator. */ export interface InterpolatorFactory { @@ -180,7 +180,7 @@ export interface ScaleContinuousNumeric { * * The second generic corresponds to the data type of the output elements generated by the scale. * - * If range element and output element type differ, the interpolator factory used with the scale must match this behaviour and + * If range element and output element type differ, the interpolator factory used with the scale must match this behavior and * convert the interpolated range element to a corresponding output element. */ export interface ScaleLinear extends ScaleContinuousNumeric { @@ -197,9 +197,9 @@ export interface ScaleLinear extends ScaleContinuousNumeric): this; /** @@ -210,11 +210,11 @@ export interface ScaleLinear extends ScaleContinuousNumeric(interpolate: InterpolatorFactory): ScaleLinear; } @@ -228,9 +228,9 @@ export function scaleLinear(): ScaleLinear; /** * Constructs a new continuous linear scale with the unit domain [0, 1], the default interpolator and clamping disabled. * - * The generic correponds to the data type of the range and output elements to be used. + * The generic corresponds to the data type of the range and output elements to be used. * - * As range type and output type are the same, the interpolator factory used with the scale must match this behaviour. + * As range type and output type are the same, the interpolator factory used with the scale must match this behavior. * The range must be set in accordance with the range element type. * * The interpolator factory may be set using the interpolate(...) method of the scale. @@ -242,7 +242,7 @@ export function scaleLinear(): ScaleLinear; * The first generic corresponds to the data type of the range elements. * The second generic corresponds to the data type of the output elements generated by the scale. * - * If range element and output element type differ, the interpolator factory used with the scale must match this behaviour and + * If range element and output element type differ, the interpolator factory used with the scale must match this behavior and * convert the interpolated range element to a corresponding output element. * * The range must be set in accordance with the range element type. @@ -271,7 +271,7 @@ export function scaleLinear(): ScaleLinear; * * The second generic corresponds to the data type of the output elements generated by the scale. * - * If range element and output element type differ, the interpolator factory used with the scale must match this behaviour and + * If range element and output element type differ, the interpolator factory used with the scale must match this behavior and * convert the interpolated range element to a corresponding output element. */ export interface ScalePower extends ScaleContinuousNumeric { @@ -288,9 +288,9 @@ export interface ScalePower extends ScaleContinuousNumeric): this; /** @@ -301,11 +301,11 @@ export interface ScalePower extends ScaleContinuousNumeric(interpolate: InterpolatorFactory): ScalePower; @@ -332,9 +332,9 @@ export function scalePow(): ScalePower; * Constructs a new continuous power scale with the unit domain [0, 1], the exponent 1, the default interpolator and clamping disabled. * (Note that this is effectively a linear scale until you set a different exponent.) * - * The generic correponds to the data type of the range and output elements to be used. + * The generic corresponds to the data type of the range and output elements to be used. * - * As range type and output type are the same, the interpolator factory used with the scale must match this behaviour. + * As range type and output type are the same, the interpolator factory used with the scale must match this behavior. * * The range must be set in accordance with the range element type. * @@ -348,7 +348,7 @@ export function scalePow(): ScalePower; * The first generic corresponds to the data type of the range elements. * The second generic corresponds to the data type of the output elements generated by the scale. * - * If range element and output element type differ, the interpolator factory used with the scale must match this behaviour and + * If range element and output element type differ, the interpolator factory used with the scale must match this behavior and * convert the interpolated range element to a corresponding output element. * * The range must be set in accordance with the range element type. @@ -368,9 +368,9 @@ export function scaleSqrt(): ScalePower; * Constructs a new continuous power scale with the unit domain [0, 1], the exponent 0.5, the default interpolator and clamping disabled. * This is a convenience method equivalent to d3.scalePow().exponent(0.5). * - * The generic correponds to the data type of the range and output elements to be used. + * The generic corresponds to the data type of the range and output elements to be used. * - * As range type and output type are the same, the interpolator factory used with the scale must match this behaviour. + * As range type and output type are the same, the interpolator factory used with the scale must match this behavior. * * The range must be set in accordance with the range element type. * @@ -384,7 +384,7 @@ export function scaleSqrt(): ScalePower; * The first generic corresponds to the data type of the range elements. * The second generic corresponds to the data type of the output elements generated by the scale. * - * If range element and output element type differ, the interpolator factory used with the scale must match this behaviour and + * If range element and output element type differ, the interpolator factory used with the scale must match this behavior and * convert the interpolated range element to a corresponding output element. * * The range must be set in accordance with the range element type. @@ -417,7 +417,7 @@ export function scaleSqrt(): ScalePower; * * The second generic corresponds to the data type of the output elements generated by the scale. * - * If range element and output element type differ, the interpolator factory used with the scale must match this behaviour and + * If range element and output element type differ, the interpolator factory used with the scale must match this behavior and * convert the interpolated range element to a corresponding output element. */ export interface ScaleLogarithmic extends ScaleContinuousNumeric { @@ -456,9 +456,9 @@ export interface ScaleLogarithmic extends ScaleContinuousNumeric< * If the scale is used to set an attribute or style, this is typically acceptable (and desirable for performance); * however, if you need to store the scale’s return value, you must specify your own interpolator or make a copy as appropriate. * - * As part of the interpolation process the interpotaled value from the range may be converted to a corresponding output value. + * As part of the interpolation process the interpolated value from the range may be converted to a corresponding output value. * - * @param interpolate An interpolation factory. The generics for Range and Output of the scale must correpond to the interpolation factory applied to the scale. + * @param interpolate An interpolation factory. The generics for Range and Output of the scale must correspond to the interpolation factory applied to the scale. */ interpolate(interpolate: InterpolatorFactory): this; /** @@ -469,11 +469,11 @@ export interface ScaleLogarithmic extends ScaleContinuousNumeric< * If the scale is used to set an attribute or style, this is typically acceptable (and desirable for performance); * however, if you need to store the scale’s return value, you must specify your own interpolator or make a copy as appropriate. * - * As part of the interpolation process the interpotaled value from the range may be converted to a corresponding output value. + * As part of the interpolation process the interpolated value from the range may be converted to a corresponding output value. * * The generic "NewOutput" can be used to change the scale to have a different output element type corresponding to the new interpolation factory. * - * @param interpolate An interpolation factory. The generics for Range and Output of the scale must correpond to the interpolation factory applied to the scale. + * @param interpolate An interpolation factory. The generics for Range and Output of the scale must correspond to the interpolation factory applied to the scale. */ interpolate(interpolate: InterpolatorFactory): ScaleLogarithmic; @@ -537,9 +537,9 @@ export function scaleLog(): ScaleLogarithmic; /** * Constructs a new continuous logarithmic scale with the domain [1, 10], the base 10, the default interpolator and clamping disabled. * - * The generic correponds to the data type of the range and output elements to be used. + * The generic corresponds to the data type of the range and output elements to be used. * - * As range type and output type are the same, the interpolator factory used with the scale must match this behaviour. + * As range type and output type are the same, the interpolator factory used with the scale must match this behavior. * * The range must be set in accordance with the range element type. * @@ -552,7 +552,7 @@ export function scaleLog(): ScaleLogarithmic; * The first generic corresponds to the data type of the range elements. * The second generic corresponds to the data type of the output elements generated by the scale. * - * If range element and output element type differ, the interpolator factory used with the scale must match this behaviour and + * If range element and output element type differ, the interpolator factory used with the scale must match this behavior and * convert the interpolated range element to a corresponding output element. * * The range must be set in accordance with the range element type. @@ -696,7 +696,7 @@ export function scaleIdentity(): ScaleIdentity; * * The second generic corresponds to the data type of the output elements generated by the scale. * - * If range element and output element type differ, the interpolator factory used with the scale must match this behaviour and + * If range element and output element type differ, the interpolator factory used with the scale must match this behavior and * convert the interpolated range element to a corresponding output element. */ export interface ScaleTime { @@ -798,9 +798,9 @@ export interface ScaleTime { * If the scale is used to set an attribute or style, this is typically acceptable (and desirable for performance); * however, if you need to store the scale’s return value, you must specify your own interpolator or make a copy as appropriate. * - * As part of the interpolation process the interpotaled value from the range may be converted to a corresponding output value. + * As part of the interpolation process the interpolated value from the range may be converted to a corresponding output value. * - * @param interpolate An interpolation factory. The generics for Range and Output of the scale must correpond to the interpolation factory applied to the scale. + * @param interpolate An interpolation factory. The generics for Range and Output of the scale must correspond to the interpolation factory applied to the scale. */ interpolate(interpolate: InterpolatorFactory): this; /** @@ -811,11 +811,11 @@ export interface ScaleTime { * If the scale is used to set an attribute or style, this is typically acceptable (and desirable for performance); * however, if you need to store the scale’s return value, you must specify your own interpolator or make a copy as appropriate. * - * As part of the interpolation process the interpotaled value from the range may be converted to a corresponding output value. + * As part of the interpolation process the interpolated value from the range may be converted to a corresponding output value. * * The generic "NewOutput" can be used to change the scale to have a different output element type corresponding to the new interpolation factory. * - * @param interpolate An interpolation factory. The generics for Range and Output of the scale must correpond to the interpolation factory applied to the scale. + * @param interpolate An interpolation factory. The generics for Range and Output of the scale must correspond to the interpolation factory applied to the scale. */ interpolate(interpolate: InterpolatorFactory): ScaleTime; @@ -942,9 +942,9 @@ export function scaleTime(): ScaleTime; /** * Constructs a new time scale using local time with the domain [2000-01-01, 2000-01-02], the default interpolator and clamping disabled. * - * The generic correponds to the data type of the range and output elements to be used. + * The generic corresponds to the data type of the range and output elements to be used. * - * As range type and output type are the same, the interpolator factory used with the scale must match this behaviour. + * As range type and output type are the same, the interpolator factory used with the scale must match this behavior. * * The range must be set in accordance with the range element type. * @@ -957,7 +957,7 @@ export function scaleTime(): ScaleTime; * The first generic corresponds to the data type of the range elements. * The second generic corresponds to the data type of the output elements generated by the scale. * - * If range element and output element type differ, the interpolator factory used with the scale must match this behaviour and + * If range element and output element type differ, the interpolator factory used with the scale must match this behavior and * convert the interpolated range element to a corresponding output element. * * The range must be set in accordance with the range element type. @@ -975,9 +975,9 @@ export function scaleUtc(): ScaleTime; /** * Constructs a new time scale using Coordinated Universal Time (UTC) with the domain [2000-01-01, 2000-01-02], the default interpolator and clamping disabled. * - * The generic correponds to the data type of the range and output elements to be used. + * The generic corresponds to the data type of the range and output elements to be used. * - * As range type and output type are the same, the interpolator factory used with the scale must match this behaviour. + * As range type and output type are the same, the interpolator factory used with the scale must match this behavior. * * The range must be set in accordance with the range element type. * @@ -990,7 +990,7 @@ export function scaleUtc(): ScaleTime; * The first generic corresponds to the data type of the range elements. * The second generic corresponds to the data type of the output elements generated by the scale. * - * If range element and output element type differ, the interpolator factory used with the scale must match this behaviour and + * If range element and output element type differ, the interpolator factory used with the scale must match this behavior and * convert the interpolated range element to a corresponding output element. * * The range must be set in accordance with the range element type. @@ -1267,7 +1267,7 @@ export function scaleQuantize(): ScaleQuantize; * The number of values in (the cardinality of) the output range determines the number of quantiles that will be computed from the domain. * To compute the quantiles, the domain is sorted, and treated as a population of discrete values; see d3-array’s quantile. * - * The generic correponds to the data type of range elements. + * The generic corresponds to the data type of range elements. */ export interface ScaleQuantile { /** @@ -1337,7 +1337,7 @@ export function scaleQuantile(): ScaleQuantile; * Constructs a new quantile scale with an empty domain and an empty range. * The quantile scale is invalid until both a domain and range are specified. * - * The generic correponds to the data type of range elements. + * The generic corresponds to the data type of range elements. */ export function scaleQuantile(): ScaleQuantile; @@ -1678,7 +1678,7 @@ export function scaleBand(): ScaleBand; /** * Constructs a new band scale with the empty domain, the unit range [0, 1], no padding, no rounding and center alignment. * - * The generic correponds to the data type of domain elements. + * The generic corresponds to the data type of domain elements. */ export function scaleBand(): ScaleBand; diff --git a/types/d3-selection/d3-selection-tests.ts b/types/d3-selection/d3-selection-tests.ts index e4f50c89e4..54ddb5ea11 100644 --- a/types/d3-selection/d3-selection-tests.ts +++ b/types/d3-selection/d3-selection-tests.ts @@ -162,8 +162,8 @@ const svgEl: d3Selection.Selection = let firstG: d3Selection.Selection = svgEl.select('g'); // let firstG_2: d3Selection.Selection = svgEl.select('g'); // fails, parent element of selection does not change with .select(...) -// firstG = svgEl.select('g'); // fails, element type defaults to 'BaseType', but SVGGElement expexted on left-hand side -// firstG = svgEl.select('svg'); // fails, element type of SVGSVGElement provided, but SVGGElement expexted on left-hand side (silly test to begin with) +// firstG = svgEl.select('g'); // fails, element type defaults to 'BaseType', but SVGGElement expected on left-hand side +// firstG = svgEl.select('svg'); // fails, element type of SVGSVGElement provided, but SVGGElement expected on left-hand side (silly test to begin with) // test, when it is not certain, whether an element of the type to be selected exists let maybeG: d3Selection.Selection; @@ -173,7 +173,7 @@ maybeG = svgEl.select('g'); // Using select(...) sub-selection with a selector function argument. function svgGroupSelector(this: SVGSVGElement, d: SVGDatum, i: number, groups: SVGSVGElement[] | ArrayLike): SVGGElement { - return this.querySelector('g')!; // this-type compatible with group element-type to which the selector function will be appplied + return this.querySelector('g')!; // this-type compatible with group element-type to which the selector function will be applied } firstG = svgEl.select(svgGroupSelector); @@ -224,7 +224,7 @@ let gElementsOldData: d3Selection.Selection): NodeListOf { - return this.querySelectorAll('g'); // this-type compatible with group element-type to which the selector function will be appplied + return this.querySelectorAll('g'); // this-type compatible with group element-type to which the selector function will be applied } gElementsOldData = svgEl.selectAll(svgGroupSelectorAll); @@ -302,11 +302,11 @@ gElementsOldData = svgEl.selectAll(d3Selection.selecto // Scenario 1: Filter retaining the element type of the select group (i.e. no type narrowing during filtering) -let filterdGElements: d3Selection.Selection; +let filteredGElements: d3Selection.Selection; -filterdGElements = gElementsOldData.filter('.top-level'); +filteredGElements = gElementsOldData.filter('.top-level'); -filterdGElements = gElementsOldData.filter(function(d, i, g) { +filteredGElements = gElementsOldData.filter(function(d, i, g) { const that: SVGGElement = this; // const that2: HTMLElement = this; // fails, type mismatch const datum: CircleDatum = d; @@ -322,23 +322,23 @@ filterdGElements = gElementsOldData.filter(function(d, i, g) { // Scenario 2: Filtering narrows the type of selected elements in a known way // assume the class ".any-svg-type" can only be assigned to SVGElements in the DOM -let filterdGElements2: d3Selection.Selection; +let filteredGElements2: d3Selection.Selection; -filterdGElements2 = d3Selection.selectAll('.any-svg-type').filter('g'); -// filterdGElements2 = d3Selection.selectAll('.any-type').filter('g'); // fails without using narrowing generic on filter method +filteredGElements2 = d3Selection.selectAll('.any-svg-type').filter('g'); +// filteredGElements2 = d3Selection.selectAll('.any-type').filter('g'); // fails without using narrowing generic on filter method -filterdGElements2 = d3Selection.selectAll('.any-svg-type').filter(function() { +filteredGElements2 = d3Selection.selectAll('.any-svg-type').filter(function() { const that: SVGElement = this; return that.tagName === 'g' || that.tagName === 'G'; }); -// filterdGElements2 = d3Selection.selectAll('.any-svg-type').filter(function(){ +// filteredGElements2 = d3Selection.selectAll('.any-svg-type').filter(function(){ // const that: SVGElement = this; // return that.tagName === 'g'|| that.tagName === 'G'; // }); // fails without using narrowing generic on filter method // matcher() ----------------------------------------------------------------------------- -filterdGElements = gElementsOldData.filter(d3Selection.matcher('.top-level')); +filteredGElements = gElementsOldData.filter(d3Selection.matcher('.top-level')); // --------------------------------------------------------------------------------------- // Tests of Modification @@ -644,7 +644,7 @@ let circles2: d3Selection.Selection = (this: T, datum: Datum, /** * TransitionLike is a helper interface to represent a quasi-Transition, without specifying the full Transition interface in this file. - * For example, whereever d3-zoom allows a Transition to be passed in as an argument, it internally immediately invokes its `selection()` + * For example, wherever d3-zoom allows a Transition to be passed in as an argument, it internally immediately invokes its `selection()` * method to retrieve the underlying Selection object before proceeding. * d3-brush uses a subset of Transition methods internally. * The use of this interface instead of the full imported Transition interface is [referred] to achieve @@ -480,7 +480,7 @@ export interface Selection(type: string): Selection; /** - * Appends a new element of the type provided by the element creator functionas the last child of each selected element, + * Appends a new element of the type provided by the element creator function as the last child of each selected element, * or before the next following sibling in the update selection if this is an enter selection. * The latter behavior for enter selections allows you to insert elements into the DOM in an order consistent with the new bound data; * however, note that selection.order may still be required if updating elements change order diff --git a/types/d3-shape/index.d.ts b/types/d3-shape/index.d.ts index 5408508683..47e5c10feb 100644 --- a/types/d3-shape/index.d.ts +++ b/types/d3-shape/index.d.ts @@ -32,7 +32,7 @@ export interface DefaultArcObject { */ endAngle: number; /** - * Optional. Pad angle of arcin radians. + * Optional. Pad angle of arc in radians. */ padAngle?: number; } @@ -741,7 +741,7 @@ export interface Line { /** * Returns the current curve factory, which defaults to curveLinear. * - * The generic allows to cast the curve factory to a specifc type, if known. + * The generic allows to cast the curve factory to a specific type, if known. */ curve(): C; /** @@ -916,7 +916,7 @@ export interface LineRadial { /** * Returns the current curve factory, which defaults to curveLinear. * - * The generic allows to cast the curve factory to a specifc type, if known. + * The generic allows to cast the curve factory to a specific type, if known. */ curve(): C; /** @@ -1213,7 +1213,7 @@ export interface Area { /** * Returns the current curve factory, which defaults to curveLinear. * - * The generic allows to cast the curve factory to a specifc type, if known. + * The generic allows to cast the curve factory to a specific type, if known. */ curve(): C; /** @@ -1518,7 +1518,7 @@ export interface AreaRadial { /** * Returns the current curve factory, which defaults to curveLinear. * - * The generic allows to cast the curve factory to a specifc type, if known. + * The generic allows to cast the curve factory to a specific type, if known. */ curve(): C; /** @@ -2280,7 +2280,7 @@ export interface SymbolType { * use a transform (see: SVG, Canvas) to move the arc to a different position. * * The first generic corresponds to the "this" context within which the symbol generator is invoked. - * The second generic corrsponds to the data type of the datum underlying the symbol. + * The second generic corresponds to the data type of the datum underlying the symbol. */ export interface Symbol { /** @@ -2382,7 +2382,7 @@ export function symbol(): Symbol; // tslint:disable-line ban-types /** * Constructs a new symbol generator with the default settings. * - * The generic corrsponds to the data type of the datum underlying the symbol. + * The generic corresponds to the data type of the datum underlying the symbol. */ export function symbol(): Symbol; // tslint:disable-line ban-types @@ -2390,7 +2390,7 @@ export function symbol(): Symbol; // tslint:disable-line ban- * Constructs a new symbol generator with the default settings. * * The first generic corresponds to the "this" context within which the symbol generator is invoked. - * The second generic corrsponds to the data type of the datum underlying the symbol. + * The second generic corresponds to the data type of the datum underlying the symbol. */ export function symbol(): Symbol; // tslint:disable-line ban-types @@ -2460,11 +2460,11 @@ export function pointRadial(angle: number, radius: number): [number, number]; */ export interface SeriesPoint extends Array { /** - * Correponds to y0, the lower value (baseline). + * Corresponds to y0, the lower value (baseline). */ 0: number; /** - * Correponds to y1, the upper value (topline). + * Corresponds to y1, the upper value (topline). */ 1: number; /** @@ -2565,7 +2565,7 @@ export interface Stack { value(value: (d: Datum, key: Key, j: number, data: Datum[]) => number): this; /** - * Returns the current order acccesor, which defaults to stackOrderNone; this uses the order given by the key accessor. + * Returns the current order accessor, which defaults to stackOrderNone; this uses the order given by the key accessor. */ order(): (series: Series) => number[]; /** @@ -2596,7 +2596,7 @@ export interface Stack { order(order: (series: Series) => number[]): this; /** - * Returns the current offset acccesor, which defaults to stackOffsetNone; this uses a zero baseline. + * Returns the current offset accessor, which defaults to stackOffsetNone; this uses a zero baseline. */ offset(): (series: Series, order: number[]) => void; /** diff --git a/types/d3-time/index.d.ts b/types/d3-time/index.d.ts index 3d88edbf27..b8aa2f12aa 100644 --- a/types/d3-time/index.d.ts +++ b/types/d3-time/index.d.ts @@ -22,7 +22,7 @@ export interface TimeInterval { * This function is idempotent: if the specified date is already floored to the current interval, * a new date with an identical time is returned. * Furthermore, the returned date is the minimum expressible value of the associated interval, - * such that interval.floor(interval.floor(date) - 1) returns the preceeding interval boundary date. + * such that interval.floor(interval.floor(date) - 1) returns the preceding interval boundary date. * * Note that the == and === operators do not compare by value with Date objects, * and thus you cannot use them to tell whether the specified date has already been floored. @@ -42,7 +42,7 @@ export interface TimeInterval { * This method is idempotent: if the specified date is already floored to the current interval, * a new date with an identical time is returned. * Furthermore, the returned date is the minimum expressible value of the associated interval, - * such that interval.floor(interval.floor(date) - 1) returns the preceeding interval boundary date. + * such that interval.floor(interval.floor(date) - 1) returns the preceding interval boundary date. * * Note that the == and === operators do not compare by value with Date objects, * and thus you cannot use them to tell whether the specified date has already been floored. @@ -165,7 +165,7 @@ export interface CountableTimeInterval extends TimeInterval { /** * Constructs a new custom interval given the specified floor and offset functions. * - * The returned custom interval is not countable, i.e. does not exposee the methods "count(..)" and "every(...)". + * The returned custom interval is not countable, i.e. does not expose the methods "count(..)" and "every(...)". * * @param floor A floor function which takes a single date as an argument and rounds it down to the nearest interval boundary. * @param offset An offset function which takes a date and an integer step as arguments and advances @@ -447,12 +447,12 @@ export function timeYears(start: Date, stop: Date, step?: number): Date[]; // utc Universal Coordinated Time ---------------------------------------------------------- /** - * Milliseconds Interval in Univarsal Coordinated Time (UTC); the shortest available time unit. + * Milliseconds Interval in Universal Coordinated Time (UTC); the shortest available time unit. */ export const utcMillisecond: CountableTimeInterval; /** - * This is a convenience alias for utcMilliesecond.range(...). + * This is a convenience alias for utcMillisecond.range(...). * * @param start A start date object for the range. * @param stop A stop date object for the range. @@ -461,7 +461,7 @@ export const utcMillisecond: CountableTimeInterval; export function utcMilliseconds(start: Date, stop: Date, step?: number): Date[]; /** - * Seconds Interval in Univarsal Coordinated Time (UTC); seconds (e.g., 01:23:45.0000 AM); 1,000 milliseconds. + * Seconds Interval in Universal Coordinated Time (UTC); seconds (e.g., 01:23:45.0000 AM); 1,000 milliseconds. */ export const utcSecond: CountableTimeInterval; @@ -475,7 +475,7 @@ export const utcSecond: CountableTimeInterval; export function utcSeconds(start: Date, stop: Date, step?: number): Date[]; /** - * Minutes Interval in Univarsal Coordinated Time (UTC); minutes (e.g., 01:02:00 AM); 60 seconds. + * Minutes Interval in Universal Coordinated Time (UTC); minutes (e.g., 01:02:00 AM); 60 seconds. * Note that ECMAScript ignores leap seconds. */ export const utcMinute: CountableTimeInterval; @@ -490,7 +490,7 @@ export const utcMinute: CountableTimeInterval; export function utcMinutes(start: Date, stop: Date, step?: number): Date[]; /** - * Hours Interval in Univarsal Coordinated Time (UTC); Hours (e.g., 01:00 AM); 60 minutes. + * Hours Interval in Universal Coordinated Time (UTC); Hours (e.g., 01:00 AM); 60 minutes. */ export const utcHour: CountableTimeInterval; @@ -504,7 +504,7 @@ export const utcHour: CountableTimeInterval; export function utcHours(start: Date, stop: Date, step?: number): Date[]; /** - * Days Interval in Univarsal Coordinated Time (UTC); days (e.g., February 7, 2012 at 12:00 AM); 24 hours. + * Days Interval in Universal Coordinated Time (UTC); days (e.g., February 7, 2012 at 12:00 AM); 24 hours. */ export const utcDay: CountableTimeInterval; @@ -533,7 +533,7 @@ export const utcWeek: CountableTimeInterval; export function utcWeeks(start: Date, stop: Date, step?: number): Date[]; /** - * Week Interval for Sunday-based weeks in Univarsal Coordinated Time (UTC) (e.g., February 5, 2012 at 12:00 AM). + * Week Interval for Sunday-based weeks in Universal Coordinated Time (UTC) (e.g., February 5, 2012 at 12:00 AM). * 7 days and 168 hours. */ export const utcSunday: CountableTimeInterval; @@ -548,7 +548,7 @@ export const utcSunday: CountableTimeInterval; export function utcSundays(start: Date, stop: Date, step?: number): Date[]; /** - * Week Interval for Monday-based weeks in Univarsal Coordinated Time (UTC) (e.g., February 6, 2012 at 12:00 AM). + * Week Interval for Monday-based weeks in Universal Coordinated Time (UTC) (e.g., February 6, 2012 at 12:00 AM). * 7 days and 168 hours. */ export const utcMonday: CountableTimeInterval; @@ -563,7 +563,7 @@ export const utcMonday: CountableTimeInterval; export function utcMondays(start: Date, stop: Date, step?: number): Date[]; /** - * Week Interval for Tuesday-based weeks in Univarsal Coordinated Time (UTC) (e.g., February 7, 2012 at 12:00 AM). + * Week Interval for Tuesday-based weeks in Universal Coordinated Time (UTC) (e.g., February 7, 2012 at 12:00 AM). * 7 days and 168 hours. */ export const utcTuesday: CountableTimeInterval; @@ -578,7 +578,7 @@ export const utcTuesday: CountableTimeInterval; export function utcTuesdays(start: Date, stop: Date, step?: number): Date[]; /** - * Week Interval for Wednesday-based weeks in Univarsal Coordinated Time (UTC) (e.g., February 8, 2012 at 12:00 AM). + * Week Interval for Wednesday-based weeks in Universal Coordinated Time (UTC) (e.g., February 8, 2012 at 12:00 AM). * 7 days and 168 hours. */ export const utcWednesday: CountableTimeInterval; @@ -593,7 +593,7 @@ export const utcWednesday: CountableTimeInterval; export function utcWednesdays(start: Date, stop: Date, step?: number): Date[]; /** - * Week Interval for Thursday-based weeks in Univarsal Coordinated Time (UTC) (e.g., February 9, 2012 at 12:00 AM). + * Week Interval for Thursday-based weeks in Universal Coordinated Time (UTC) (e.g., February 9, 2012 at 12:00 AM). * 7 days and 168 hours. */ export const utcThursday: CountableTimeInterval; @@ -608,7 +608,7 @@ export const utcThursday: CountableTimeInterval; export function utcThursdays(start: Date, stop: Date, step?: number): Date[]; /** - * Week Interval for Friday-based weeks in Univarsal Coordinated Time (UTC) (e.g., February 10, 2012 at 12:00 AM). + * Week Interval for Friday-based weeks in Universal Coordinated Time (UTC) (e.g., February 10, 2012 at 12:00 AM). * 7 days and 168 hours. */ export const utcFriday: CountableTimeInterval; @@ -623,7 +623,7 @@ export const utcFriday: CountableTimeInterval; export function utcFridays(start: Date, stop: Date, step?: number): Date[]; /** - * Week Interval for Saturday-based weeks in Univarsal Coordinated Time (UTC) (e.g., February 11, 2012 at 12:00 AM). + * Week Interval for Saturday-based weeks in Universal Coordinated Time (UTC) (e.g., February 11, 2012 at 12:00 AM). * 7 days and 168 hours. */ export const utcSaturday: CountableTimeInterval; @@ -638,7 +638,7 @@ export const utcSaturday: CountableTimeInterval; export function utcSaturdays(start: Date, stop: Date, step?: number): Date[]; /** - * Month Interval in Univarsal Coordinated Time (UTC); months (e.g., February 1, 2012 at 12:00 AM); ranges from 28 to 31 days. + * Month Interval in Universal Coordinated Time (UTC); months (e.g., February 1, 2012 at 12:00 AM); ranges from 28 to 31 days. */ export const utcMonth: CountableTimeInterval; @@ -652,7 +652,7 @@ export const utcMonth: CountableTimeInterval; export function utcMonths(start: Date, stop: Date, step?: number): Date[]; /** - * Year Interval in Univarsal Coordinated Time (UTC); years (e.g., January 1, 2012 at 12:00 AM); ranges from 365 to 366 days. + * Year Interval in Universal Coordinated Time (UTC); years (e.g., January 1, 2012 at 12:00 AM); ranges from 365 to 366 days. */ export const utcYear: CountableTimeInterval; diff --git a/types/d3-transition/d3-transition-tests.ts b/types/d3-transition/d3-transition-tests.ts index ba0ae99750..9ee4a8e43d 100644 --- a/types/d3-transition/d3-transition-tests.ts +++ b/types/d3-transition/d3-transition-tests.ts @@ -142,13 +142,13 @@ let newEnterTransition: d3Transition.Transition; -let differentDatumTypeTransition: d3Transition.Transition; +let differentDatumTypeTransition: d3Transition.Transition; // Comparable use cases arise e.g. when using an existing transition to generate a new transition // on a different selection to synchronize them (see e.g. Mike Bostock's Brush & Zoom II Example https://bl.ocks.org/mbostock/f48fcdb929a620ed97877e4678ab15e6) differentElementTypeTransition = select('body').selectAll('svg').transition(); newEnterTransition = enterCircles.transition(differentElementTypeTransition); -differentDatumTypeTransition = select('svg').selectAll('circle').transition(); +differentDatumTypeTransition = select('svg').selectAll('circle').transition(); newEnterTransition = enterCircles.transition(differentDatumTypeTransition); // -------------------------------------------------------------------------- @@ -234,18 +234,18 @@ exitTransition = exitTransition.filter(function(d, i, g) { const index: number = i; const group: SVGCircleElement[] | ArrayLike = g; // console.log(this.x) // fails, x property not defined on SVGCircleElement - return this.r.baseVal.value < i * d.r; // this-type SVGCircleElement, datum tpye CircleDatum + return this.r.baseVal.value < i * d.r; // this-type SVGCircleElement, datum type CircleDatum }); // Scenario 2: Filtering narrows the type of selected elements in a known way // assume the class ".any-svg-type" can only be assigned to SVGElements in the DOM -let filterdGElements2: d3Transition.Transition; +let filteredGElements2: d3Transition.Transition; -filterdGElements2 = selectAll('.any-svg-type').transition().filter('g'); -// filterdGElements2 = selectAll('.any-type').transition().filter('g'); // fails without using narrowing generic on filter method +filteredGElements2 = selectAll('.any-svg-type').transition().filter('g'); +// filteredGElements2 = selectAll('.any-type').transition().filter('g'); // fails without using narrowing generic on filter method -filterdGElements2 = selectAll('.any-svg-type').transition().filter(function(d, i, g) { +filteredGElements2 = selectAll('.any-svg-type').transition().filter(function(d, i, g) { const that: SVGElement = this; // const that2: HTMLElement = this; // fails, type mismatch const datum: CircleDatum = d; @@ -253,7 +253,7 @@ filterdGElements2 = selectAll('.any-svg-type').transition().fil const group: SVGElement[] | ArrayLike = g; return that.tagName === 'g' || that.tagName === 'G'; }); -// filterdGElements2 = selectAll('.any-svg-type').transition().filter(function(){ +// filteredGElements2 = selectAll('.any-svg-type').transition().filter(function(){ // const that: SVGElement = this; // return that.tagName === 'g'|| that.tagName === 'G'; // }); // fails without using narrowing generic on filter method diff --git a/types/d3-zoom/d3-zoom-tests.ts b/types/d3-zoom/d3-zoom-tests.ts index 669b4af8ff..8051898b8b 100644 --- a/types/d3-zoom/d3-zoom-tests.ts +++ b/types/d3-zoom/d3-zoom-tests.ts @@ -84,7 +84,7 @@ interface GroupDatum { } // -------------------------------------------------------------------------- -// Test Define ZoomBehaviour +// Test Define ZoomBehavior // -------------------------------------------------------------------------- // Canvas Example ----------------------------------------------------------- @@ -235,7 +235,7 @@ const duration: number = svgZoom.duration(); // interpolate() -------------------------------------------------------------- -// chainable setter accepts interpoateZoom, interpolate and interpolateArray +// chainable setter accepts interpolateZoom, interpolate and interpolateArray svgZoom = svgZoom.interpolate(interpolateZoom); svgZoom = svgZoom.interpolate(interpolate); svgZoom = svgZoom.interpolate(interpolateArray); @@ -269,7 +269,7 @@ if (zoomHandler) { svgZoom.on('zoom', zoomHandler); } // -------------------------------------------------------------------------- -// Test Attach ZoomBehaviour +// Test Attach ZoomBehavior // -------------------------------------------------------------------------- // Canvas Example ----------------------------------------------------------- @@ -290,14 +290,14 @@ const svgOverlay: Selection = svg.ap const svgOverlayTransition = svgOverlay.transition(); // -------------------------------------------------------------------------- -// Test Use ZoomBehaviour +// Test Use ZoomBehavior // -------------------------------------------------------------------------- // transform() ------------------------------------------------------------------------------------- // use on selection svgZoom.transform(svgOverlay, d3Zoom.zoomIdentity); -// svgZoom.transform(groupsSelection, d3Zoom.zoomIdentity); // fails, as groupSelection mismachtes DOM Element type and datum type +// svgZoom.transform(groupsSelection, d3Zoom.zoomIdentity); // fails, as groupSelection mismatches DOM Element type and datum type svgZoom.transform(svgOverlay, function(datum, index, groups) { const that: SVGRectElement = this; @@ -310,7 +310,7 @@ svgZoom.transform(svgOverlay, function(datum, index, groups) { }); // use on transition svgOverlayTransition.call(svgZoom.transform, d3Zoom.zoomIdentity); -// svgZoom.transform(groupsTransition, d3Zoom.zoomIdentity); // fails, as groupTransition mismachtes DOM Element type and datum type +// svgZoom.transform(groupsTransition, d3Zoom.zoomIdentity); // fails, as groupTransition mismatches DOM Element type and datum type svgZoom.transform(svgOverlayTransition, d3Zoom.zoomIdentity); svgZoom.transform(svgOverlayTransition, function(datum, index, groups) { @@ -327,7 +327,7 @@ svgZoom.transform(svgOverlayTransition, function(datum, index, groups) { // use on selection svgZoom.translateBy(svgOverlay, 20, 50); -// svgZoom.translateBy(groupsSelection, 20, 50); // fails, as groupSelection mismachtes DOM Element type and datum type +// svgZoom.translateBy(groupsSelection, 20, 50); // fails, as groupSelection mismatches DOM Element type and datum type svgZoom.translateBy( svgOverlay, @@ -376,7 +376,7 @@ svgZoom.translateBy( // use on transition svgZoom.translateBy(svgOverlayTransition, 20, 50); -// svgZoom.translateBy(groupsTransition, 20, 50); // fails, as groupTransition mismachtes DOM Element type and datum type +// svgZoom.translateBy(groupsTransition, 20, 50); // fails, as groupTransition mismatches DOM Element type and datum type svgZoom.translateBy( svgOverlayTransition, @@ -427,7 +427,7 @@ svgZoom.translateBy( // use on selection svgZoom.translateTo(svgOverlay, 20, 50); -// svgZoom.translateTo(groupsSelection, 20, 50); // fails, as groupSelection mismachtes DOM Element type and datum type +// svgZoom.translateTo(groupsSelection, 20, 50); // fails, as groupSelection mismatches DOM Element type and datum type svgZoom.translateTo( svgOverlay, @@ -476,7 +476,7 @@ svgZoom.translateTo( // use on transition svgZoom.translateTo(svgOverlayTransition, 20, 50); -// svgZoom.translateTo(groupsTransition, 20, 50); // fails, as groupTransition mismachtes DOM Element type and datum type +// svgZoom.translateTo(groupsTransition, 20, 50); // fails, as groupTransition mismatches DOM Element type and datum type svgZoom.translateTo( svgOverlayTransition, @@ -527,7 +527,7 @@ svgZoom.translateTo( // use on selection svgZoom.scaleBy(svgOverlay, 3); -// svgZoom.scaleBy(groupsSelection, 3); // fails, as groupSelection mismachtes DOM Element type and datum type +// svgZoom.scaleBy(groupsSelection, 3); // fails, as groupSelection mismatches DOM Element type and datum type svgZoom.scaleBy(svgOverlay, function(datum, index, groups) { const that: SVGRectElement = this; @@ -540,7 +540,7 @@ svgZoom.scaleBy(svgOverlay, function(datum, index, groups) { }); // use on transition svgZoom.scaleBy(svgOverlayTransition, 3); -// svgZoom.scaleBy(groupsTransition, 3); // fails, as groupTransition mismachtes DOM Element type and datum type +// svgZoom.scaleBy(groupsTransition, 3); // fails, as groupTransition mismatches DOM Element type and datum type svgZoom.scaleBy(svgOverlayTransition, function(datum, index, groups) { const that: SVGRectElement = this; @@ -556,7 +556,7 @@ svgZoom.scaleBy(svgOverlayTransition, function(datum, index, groups) { // use on selection svgZoom.scaleTo(svgOverlay, 3); -// svgZoom.scaleBy(groupsSelection, 3); // fails, as groupSelection mismachtes DOM Element type and datum type +// svgZoom.scaleBy(groupsSelection, 3); // fails, as groupSelection mismatches DOM Element type and datum type svgZoom.scaleTo(svgOverlay, function(datum, index, groups) { const that: SVGRectElement = this; @@ -569,7 +569,7 @@ svgZoom.scaleTo(svgOverlay, function(datum, index, groups) { }); // use on transition svgZoom.scaleTo(svgOverlayTransition, 3); -// svgZoom.scaleBy(groupsTransition, 3); // fails, as groupTransition mismachtes DOM Element type and datum type +// svgZoom.scaleBy(groupsTransition, 3); // fails, as groupTransition mismatches DOM Element type and datum type svgZoom.scaleTo(svgOverlayTransition, function(datum, index, groups) { const that: SVGRectElement = this; diff --git a/types/d3-zoom/index.d.ts b/types/d3-zoom/index.d.ts index cf9b1ac89d..5ba719d227 100644 --- a/types/d3-zoom/index.d.ts +++ b/types/d3-zoom/index.d.ts @@ -693,7 +693,7 @@ export interface ZoomBehavior ((t: number) => ZoomView)): this; @@ -921,7 +921,7 @@ export interface ZoomTransform { * * For details see {@link https://github.com/d3/d3-zoom#zoom-transforms} * - * @param node An element for which to retrieve its current zoomt transform. + * @param node An element for which to retrieve its current zoom transform. */ export function zoomTransform(node: ZoomedElementBaseType): ZoomTransform; diff --git a/types/d3/d3-tests.ts b/types/d3/d3-tests.ts index 3942256a76..706c096968 100644 --- a/types/d3/d3-tests.ts +++ b/types/d3/d3-tests.ts @@ -2,6 +2,6 @@ import * as d3 from 'd3'; const version: string = d3.version; -// NOTE: Tests for all re-exports of consituent D3 modules are omitted as excessive. +// NOTE: Tests for all re-exports of constituent D3 modules are omitted as excessive. // The standard bundle definition is a straightforward pass-through with the exception of the // above tested "version" property.