Commit Graph

20 Commits

Author SHA1 Message Date
Tom Wanzek
b42d2fac4d [d3-array]
* linting related change to arrow.
2017-03-08 16:23:22 -05:00
Tom Wanzek
12606ecfd3 [d3-array]:
* Some added tests.
2017-03-08 16:17:26 -05:00
Tom Wanzek
868ecf81e9 [d3-array] v1.1
* [Enhancement] Update signatures for `pairs`
* [Feature] Add `cross`
* Bump minor version
2017-03-07 20:30:50 -05:00
Andy
555ea54770 Lint test files too (#14791) 2017-02-23 07:15:16 -08:00
denis
681bde5adf d3.max, d3.min and d3.extent allows accessor to return undefined or null
remove undefined from Primitive
add null as possible d3-array statistics value
2017-02-15 12:22:40 +01:00
denis
3d45e75897 Linting
Errors given by tslint:
* Array type using 'T[]' is forbidden for non-simple types. Use
'Array<T>' instead.
* Error parsing header. Expected: foo MAJOR.MINOR (patch version not
allowed)
2017-02-08 18:33:50 +01:00
denis
879484cf6f Set back permute definition
Typescript 2.1 make travis fail
2017-02-08 17:51:55 +01:00
denis
f928cdd8f3 Make d3-array work with stirctNullChecks
Add tslint.json
Set strictNullChecks to true
Changes variables names in tests
Add accessors functions in tests
Add tests for mean, median, quantile, sum, deviation, variance and scan
Add undefined to Primitive type
Remove useless declarations (number extends Numeric)
Add unions of undefined where needed
Improve permute with keyof
2017-02-07 12:36:59 +01:00
Ben Greene
71d121fb2b Remove unnecessary union on extent. (#14133) 2017-01-20 09:07:09 -08:00
Andy
ae4fe7b6de Use "lib" in tsconfigs instead of "target". (#13968)
* Use "lib" in tsconfigs instead of "target".

Only add "dom" to libraries that need it. This is determined by a script, so many libraries that have "dom" maybe should not.

* Update new-package and readme

* Add back "target" where necessary
2017-01-18 07:51:51 -08:00
Andy
a4bd9fa3c1 Add "noImplicitThis" to all tsconfig.json (#13446)
* Add "noImplicitThis" to all tsconfig.json

* Use `"noImplicitThis": false` on packages with broken tests.
2016-12-19 14:11:46 -08:00
Andy
e515b24a20 Change order of overloads so that user code doesn't need parameter type declarations. (#12389) 2016-11-01 05:45:51 -07:00
Andy
31e8512c8c Fix failing tests (#12344) 2016-10-29 13:42:54 -07:00
Tom Wanzek
81a1f6650b d3-array:
* Add explicit typing to an `extent` test with mixed array including NumCoercible. It appears type inference has changed with the lates TypeScript@next (2.1.0-dev.20160912 or 2.1.0-dev.20160913). This could be a regression in TS, but for now to not break DT/types-2.0 in the interim an explicit cast is applied.
2016-09-13 09:58:44 -04:00
Tom Wanzek
86baab4f54 d3-selection and version numbers.
* d3-selection: Templated `Local` to allow generic parameter for datum type. Added additonal signatures to `Selection.property(...)` to accept `Local` as first argument. (Thanks to @gustavderdrache for catching these enhancements)
* Updated version numbers header comments to be current.
2016-08-20 13:06:14 -04:00
Tom Wanzek
61e748a7c0 Chores Fixes Enhancements Additions:
* d3-array: Changed name of import alias in test file for consistency with other test files. Deleted excess line at end of definition.
* d3-axis: Enhanced Axis.scale() getter to use generic for refined return type casting. Return type can now be more specific than AxisScale minimal interface compliance. Used `this` as return type for chainable setter methods on Axis.
* d3-brush: Use ValueFn type alias from d3-selection for harmonization of callbacks. Use `this` as return type of chainable setter methods. Fixed return type of BrushBehavior.move(...) to be void
* d3-chord: Use `this` as return type of chainable setter methods.
* d3-collection: Use `this` as return type of chainable setter methods.
* d3-color: Use `this` as return type of chainable setter methods. Added helper interface ColorCommonInstance as a fallback to allow extensibility of color spaces e.g. as through d3-hsv
* d3-dispatch: Use `this` as return type of chainable setter methods.
* d3-drag:  Use ValueFn type alias from d3-selection for harmonization of callbacks. Use `this` as return type of chainable setter methods.
* d3-ease: Removed excess space.
* d3-force: Use `this` as return type of chainable setter methods. Fixed return type of Simulation.tick() to be void. Fixed Force.initialize(...) to be optional when defining a custom force. Enhanced Simulation.force(...) getter to use generic to to cast return type to specific force type, when details are know. Updated related tests.
* d3-hsv: New definitions and tests added
* d3-interpolate: Use ColorCommonInstance to allow more general color spaces than the color space objects defined in d3-color, e.g. d3-hsv. Added related tests.
* d3-quadtree: Use `this` as return type of chainable setter methods.
* d3-scale: Fixed missing support of coercible numeric value as input to ScaleSequential. Use `this` as return type of chainable setter methods.
* d3-selection: Added type alias ValueFn which is used to harmonize callback functions. Use `this` as return type of chainable setter methods, where no new selection is returned. Removed outdated comments.
* d3-selection-multi: Added new definitions with tests.
* d3-shape: Use `this` as return type of chainable setter methods. Removed spurious `?` from callback signatures.
* d3-time: Use `this` as return type of chainable setter methods.
* d3-transition: Added type alias ValueFn which is used to harmonize callback functions. Use `this` as return type of chainable setter methods, where no new transition is returned.
* d3-voronoi: Use `this` as return type of chainable setter methods.
* d3-zoom:  Use `this` as return type of chainable setter methods. Note that ZoomTransform.scale(...) and ZoomTransform.translate(...) return new ZoomTranform objects. Use ValueFn to harmonize callbacks.

Updates the prime for the newly developed D3 version 4 definitions on a file-by-file basis.
2016-08-17 18:20:41 -04:00
Tom Wanzek
e511e4819e Chore + Typo Correction:
* New Line at end.
* No trailing whitespaces (including within commentes.)
* Indenting in accordance with editorconfig.
* Corrected typo in comment in d3-random
2016-07-28 18:32:00 -04:00
Tom Wanzek
efcf66eb65 Added module versions to the headers.
* Comments for DefinitelyTyped headers now carry reference to D3 module version as of time of drafting.
* Module definitions and tests correspond to the **completed** modules as of release 1.12.0 of repo https://github.com/tomwanzek/d3-v4-definitelytyped
2016-07-20 19:06:02 -04:00
Tom Wanzek
2789798ab3 Updated d3-array and related tests.
Definitions and tests up-to-date with release 1.12.0 including complete d3-array and d3-quadtree.
2016-07-18 20:05:59 -04:00
Tom Wanzek
020b196481 Initial commit.
* Based on d3-module definitions and tests for modules completed with tests  as of release v1.11.0 of repo https://github.com/tomwanzek/d3-v4-definitelytyped
* Includes drafts in progress for d3-array, d3-collection, and d3-force. These will be updated before  creating a pull-request for DefinitelyTyped/types-2.0 branch.
2016-07-17 14:16:52 -04:00