-
Notifications
You must be signed in to change notification settings - Fork 30.5k
Closed
Description
- I tried using the
@types/d3-hexbin
package and had problems. - I tried using the latest stable version of tsc. https://www.npmjs.com/package/typescript
- I have a question that is ignored in StackOverflow (Please ask any appropriate questions there).
- Mention the authors (see
Definitions by:
inindex.d.ts
) so they can respond.- Authors: @uncovertruth, @tomwanzek
So, I'm using d3
and d3-hexbin
as global libraries:
<script src="https://d3js.org/d3.v4.min.js"></script>
<script src="https://d3js.org/d3-hexbin.v0.2.min.js"></script>
... and referencing them in .ts
as:
/// <reference types="d3" />
/// <reference types="d3-hexbin" />
However, although this works:
const svg = d3.select('#hitmap')
... this:
const hexbin = d3.hexbin()
... fails with a :
Property 'hexbin' does not exist on type
'typeof "/Users/bytter/node_modules/@types/d3/index"'
By looking at the tests, I can see that:
import * as d3Hexbin from 'd3-hexbin';
Would export the hexbin()
function directly into the d3Hexbin
namespace, but I'm unable to figure out how to conciliate this with d3-hexbin
as a global library.
Metadata
Metadata
Assignees
Labels
No labels