diff --git a/packages/modeling/src/index.test-d.ts b/packages/modeling/src/index.test-d.ts index 56fa87b60..85ea14da6 100644 --- a/packages/modeling/src/index.test-d.ts +++ b/packages/modeling/src/index.test-d.ts @@ -1,9 +1,12 @@ -import { expectType, expectNotType, expectError } from 'tsd' +import { expectType, expectNotType, expectError, expectAssignable } from 'tsd' import { geometries } from './' +import { snap, generalize } from './operations/modifiers' const { geom2 } = geometries +expectAssignable(snap) +expectAssignable(generalize) expectType(geom2.create()) expectType(geom2.create([])) expectType( diff --git a/packages/modeling/src/operations/modifiers/generalize.d.ts b/packages/modeling/src/operations/modifiers/generalize.d.ts index 5ab0a4432..70e92e535 100644 --- a/packages/modeling/src/operations/modifiers/generalize.d.ts +++ b/packages/modeling/src/operations/modifiers/generalize.d.ts @@ -7,6 +7,6 @@ export interface GeneralizeOptions { triangulate?: boolean } -export function generalize(options: GeneralizeOptions, geometry: T): T -export function generalize(options: GeneralizeOptions, ...geometries: RecursiveArray): Array -export function generalize(options: GeneralizeOptions, ...geometries: RecursiveArray): Array +export default function generalize(options: GeneralizeOptions, geometry: T): T +export default function generalize(options: GeneralizeOptions, ...geometries: RecursiveArray): Array +export default function generalize(options: GeneralizeOptions, ...geometries: RecursiveArray): Array diff --git a/packages/modeling/src/operations/modifiers/snap.d.ts b/packages/modeling/src/operations/modifiers/snap.d.ts index 98c01c401..01010f0f8 100644 --- a/packages/modeling/src/operations/modifiers/snap.d.ts +++ b/packages/modeling/src/operations/modifiers/snap.d.ts @@ -1,6 +1,6 @@ import { Geometry } from '../../geometries/types' import RecursiveArray from '../../utils/recursiveArray' -export function snap(geometry: T): T -export function snap(...geometries: RecursiveArray): Array -export function snap(...geometries: RecursiveArray): Array +export default function snap(geometry: T): T +export default function snap(...geometries: RecursiveArray): Array +export default function snap(...geometries: RecursiveArray): Array