Turf: Missing Types for TypeScript When Using turf/circle Directly

Created on 1 Nov 2018  路  1Comment  路  Source: Turfjs/turf

Using:

import * as circle from '@turf/circle';

Could not find declaration file for module '@turf/circle'. node_modules/@turf/circle/index.js implicitly has 'any' type.

Using:

import { circle } from '@turf/turf'; // OK

It looks like no index.d.ts file is setup here: https://github.com/Turfjs/turf/tree/master/packages/turf-circle Is that needed?

typescript

Most helpful comment

I found the problem: the index.ts file should actually be named index.d.ts

Submitting a PR now.

>All comments

I found the problem: the index.ts file should actually be named index.d.ts

Submitting a PR now.

Was this page helpful?
0 / 5 - 0 ratings