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

Add typing for gl-matrix #277

Merged
merged 1 commit into from
Mar 1, 2022
Merged

Add typing for gl-matrix #277

merged 1 commit into from
Mar 1, 2022

Conversation

Pessimistress
Copy link
Collaborator

No description provided.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.008%) to 89.758% when pulling 3fcea08 on x/mercator-types into fd9f5af on master.

@Pessimistress Pessimistress merged commit faba7e9 into master Mar 1, 2022
@Pessimistress Pessimistress deleted the x/mercator-types branch March 1, 2022 06:31
@@ -4,7 +4,7 @@ import {WebMercatorViewport} from '@math.gl/web-mercator';
import {toLowPrecision} from '../utils/test-utils';

const FITBOUNDS_TEST_CASES =
/** @type {[import('@math.gl/web-mercator/fit-bounds').FitBoundsOptions, import('@math.gl/web-mercator/fit-bounds').Bounds][]} */ ([
/** @type {[import('@math.gl/web-mercator/fit-bounds').FitBoundsOptions, {longitude: number; latitude: number; zoom: number;}][]} */ ([
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can change the tests to TS as well.

@@ -0,0 +1,195 @@
type NumericArray =
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought gl-matrix comes with types now, see https://www.npmjs.com/package/@types/gl-matrix

Screen Shot 2022-03-01 at 7 18 38 AM

@Pessimistress
Copy link
Collaborator Author

The official types do not support our usage pattern (e.g. MathArray cannot be cast to [number, number, number, number])

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