Skip to content
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

Could not find a declaration file #217

Closed
LukaTchubabria opened this issue Feb 2, 2022 · 2 comments
Closed

Could not find a declaration file #217

LukaTchubabria opened this issue Feb 2, 2022 · 2 comments

Comments

@LukaTchubabria
Copy link

Does this library have no types? How to solve this problem?

import { geoCylindricalStereographic } from "d3-geo-projectio
]
Could not find a declaration file for module 'd3-geo-projection'.

@mbostock
Copy link
Member

mbostock commented Feb 2, 2022

D3 does not maintain TypeScript declarations but some are maintained by the community as part of the DefinitelyTyped project.

@mbostock mbostock closed this as completed Feb 2, 2022
@kbtz
Copy link

kbtz commented Jun 14, 2022

As a workaround one can declare the needed exports in an ambient declaration (.d.ts file) as follows:

declare module "d3-geo-projection" {
	import { GeoProjection } from "d3-geo"
	export function geoPatterson(): GeoProjection
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants