-
Notifications
You must be signed in to change notification settings - Fork 14
Exporting to d3 global from separate modules (duplicate identifier error) #41
Comments
Posted related question to aforementioned (closed) Typescript 2.0 issue. |
Opened as new issue on typescript. |
No action from the TS team on the opened TypeScript issue to date. Followed up earlier. The matter was also cross-referenced as a known open issue with an ask for comment/response in the DefinitelyTyped issue tracking the migration of this repo. See this comment there. Next step: investigate who else w/ TypeScript can comment on the issue and suggest a preferably simple solution. |
Reiterated the need for guidance/response to TypeScript issue 9681 by cross-reference in the tracking issue 9936 for D3 Definitions and affected PRs on DefinitelyTyped. |
Now under active discussion under Typescript Issue 9681 |
Still open on TypeScript. Has been flagged as Question and assigned owner. |
Definitions for all D3 standard bundle modules are now functionally complete, subject to the TypeScript issue regarding the `d3` global for individual modules tracked as issue #41. Included are also completed optional module definitions for: * d3-selection-multi * d3-hsv Thanks to @gustavderdrache @Ledragon @arrayjam for their contributions.
As the module-level migration to the DefinitelyTyped/types-2.0 branch is complete, this issue will be closed. The issue is already listed in the DefinitelyTyped Definition Request Issue 9936 for the new definitions and cross-referenced to the issue opened on TypeScript. |
Using
export as namespace d3;
to export each separate D3 module to a mergedd3
global creates a compiler error: Duplicate Identifier 'd3'When the individual D3 modules are used in a vanilla context (i.e. separately included scripts), they all expose their methods/properties under a
d3
global. See release notes for D3 version 4 regarding different use scenarios supported.In the specific case of D3, this behavior should ideally be supportable from a definitions perspective. There are no conflicts between identifiers exported from the individual modules (definitions).
Closed TypeScript 2.0 issue 'Built-In Support for UMD module definitions' contains the following statement in the Solution summary section:
The text was updated successfully, but these errors were encountered: