-
Notifications
You must be signed in to change notification settings - Fork 29.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
D3 version 4 Follow-up (Chores, Bug Fixes, Enhancements, New Modules) #10709
D3 version 4 Follow-up (Chores, Bug Fixes, Enhancements, New Modules) #10709
Conversation
* 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.
* d3-selection: Change BaseType to include Window into type alias. Updated related tests. * d3-selection-multi: Add explicit tests for ValueMap interface
Reviewed the Travis log. All errors are unrelated to this PR from what I saw. |
👍 Code looks good to me. Strange that the tests are failing, though. Wonder if you just need to merge a more up-to-date copy of types-2.0, since that branch is building cleanly. |
The tests failures are caused by a different issue... there is some case-sensitivity happening on the test server, which is not on your local machine. |
Thanks to both of you@gustavderdrache and @paulvanbrenk . |
@paulvanbrenk thanks for the merge. Is it possible to activate the webhook/publish these changes to npm~types? It does not seem to have run automagically. Thanks a lot in advance. |
No idea... @andy-ms or @RyanCavanaugh can you answer the question about publishing? |
This PR is related to issue #9936.
The PR adds definitions and tests for (in alphabetical order):
The PR also contains follow-up changes identified as chores in PR #10228, bug fixes and enhancements.
Details are contained in the commit messages.
This PR brings
DefinitelyTyped/types-2.0
to the same versions of module definitions as release v1.22.0 of the collaborative staging repo used for the initial drafting process, d3-v4-definitelytyped. The exception to this statement are the separate D3 module additions contained in PR #10453, which are still subject to the legacy dependency issue.For review/merge: @gustavderdrache @mhegazy @andy-ms @paulvanbrenk
Add a new type definition.
--target es6
and--noImplicitAny
options.-tests.ts
or `-tests.tImprovement to existing type definition.