Skip to content

Commit

Permalink
chore: convert core module to typescript (#260)
Browse files Browse the repository at this point in the history
Co-authored-by: Xiaoji Chen <cxiaoji@gmail.com>
  • Loading branch information
ibgreen and Pessimistress committed Mar 1, 2022
1 parent 916ba34 commit fd9f5af
Show file tree
Hide file tree
Showing 55 changed files with 1,537 additions and 2,534 deletions.
2 changes: 1 addition & 1 deletion dev-docs/RFCs/math-monorepo-rfc.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Using with math.gl `Vector3`:

```js
import {Ellipsoid} from '@math.gl/geospatial';
import {Vector3} from 'math.gl';
import {Vector3} from '@math.gl/core';
const cartesian = Ellipsoid.WSG84.cartographicToCartesian(new Vector3(lng, lat, z));
```

Expand Down
14 changes: 14 additions & 0 deletions docs/upgrade-guide.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Upgrade Guide

## Upgrading to v3.6

In version 3.6 the entire math.gl code base was converted to typescript (`.ts`).
While the API itself has not changed, in some cases, the introduction of types
made it harder to keep supporting some type signatures and overloads.

Known changes
- `Matrix4.lookAt()` - Now only accepts named parameters.
- `SphericalCoordinates()` - Constructor is now more restrictive in terms of what parameters it accepts.

Note that some omissions may be unintentional, feel free to report upgrade issues
in the math.gl github repo.


## Upgrading to v3.0

### Matrix API changes
Expand Down
6 changes: 5 additions & 1 deletion docs/whats-new.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,13 @@

Target Release Date: Q4, 2021

Codebase has been fully converted to typescript. In general this means that users can expect
the types exported from math.gl to be considerably improved, however in some function signatures
are no longer supported. For details, consult the [upgrade guide](./upgrade-guide).

**`@math.gl/types` (NEW)

- New module that exports a couple of typescript types that simplify handling of e.g. numeric arrays.
- New module that exports a few typescript types that e.g. generalize handling of numeric arrays.

## v3.5

Expand Down
55 changes: 0 additions & 55 deletions modules/core/src/classes/base/math-array.d.ts

This file was deleted.

0 comments on commit fd9f5af

Please sign in to comment.