Commit Graph

19 Commits

Author SHA1 Message Date
Adam Beili 34945ad3fa Fix missing tsconfig lib and other jsdoc error 2025-10-09 20:57:49 +03:00
jjspace 09a719b8fb
run prettier v3 2024-09-20 11:24:24 -04:00
Marco Hutter 0e120e1cfc Generate stricter type predicate for 'defined' 2023-08-09 15:36:11 +02:00
Matthew Amato 6debfa8ecc Make TS definition of `defined` use type predicate 2023-08-05 18:46:53 -04:00
Gabby Getz 51aae2d210 Fix typescript tests 2023-06-29 16:55:23 -04:00
James Bromwell a463626da4 New branch with only nontrivial changes 2022-04-13 11:50:14 +02:00
Sanjeet Suhag e0251c6bd3 Merge branch 'main' of https://github.com/CesiumGS/cesium into feature/rebased-gpx 2022-02-07 10:33:05 -05:00
Gabby Getz c240f4c104 Workaround ambiant const enum errors as per TS docs 2022-02-03 15:56:14 -05:00
Sanjeet Suhag 591b413dc4 Merge branch 'main' of https://github.com/CesiumGS/cesium into feature/rebased-gpx 2022-01-31 11:25:09 -05:00
puxiao 4e8627d118
Update index.ts 2021-08-24 22:06:41 +08:00
Omar Shehata e3b55f309a Add TS test and update CHANGES 2020-11-01 12:25:51 -05:00
Omar Shehata f58c2e9ff2 Fix TypeScript test for GridImageryProvider 2020-10-01 09:06:48 -04:00
jtorresfabra dc1a79a270 Rebase gpx branch 2020-09-17 10:08:55 +02:00
Matthew Amato b207a19496 Deprecate BingMapsApi
A long time ago, Cesium created instances of `BingMapsGeocoderService` and
`BigMapsImageryProvider` behind the scenes by default using a demo key.
We provided the `BingMapsApi` singleton to make it easy to set a different
key in one place.

We haven't shipped with a demo key in a long time and there's really no
good reason to maintain the `BingMapsApi` singleton at the library level.
2020-07-21 13:43:53 -04:00
Matthew Amato ce59bab288 Fix TypeScript build 2020-07-21 11:18:58 -04:00
Matthew Amato e9a5452f40 Fix geometry creation in TypeScript
None of the `XXXGeometry` classes are actually `Geometry` instances. They
are instead utility classes that create geometries via their
`createGeometry` implementation. `GeometryInstance` can take either "type"
but since JS doesn't have types we never really defined what the "utility"
type is, so the TypeScript definition for `GeometryInstance` specifies that
currently only specifies `Geometry`. This means that this valid JS code
is a compiler error in TypeScript

```
const geometryInstance = new GeometryInstance({
  geometry: new PolylineGeometry({
    positions: [],
  }),
});
```

To fix this, I introduced a `GeometryFactory` base class like we have
elsewhere in the code and changed `GeometryInstance` to take either type.
This is the only place where we actually base "non-geometry Geometry" in
the API.

Happy to consider other names, like `GeometryCreator` if we don't like
factory for some reason, but I want to get this in sooner rather than
later for 1.70.1 fixes.

Also fixed an issue with tsconfig.json I introduced in my last change
which was failing to actually catch TS compile errors because it wasn't
including the Cesium.d.ts.
2020-06-09 13:49:39 -04:00
Matthew Amato afe7b58c11 Only include Source folder in TypeScript smokescreen tests.
We were including all Cesium directories in the TypeScript smokescreen
configuration. This meant that multiple Cesium.d.ts files were included
if you did a full build and then ran `build-ts` afterwards. This updates
the config used by the smokescreen to only include Source.
2020-06-08 15:34:27 -04:00
Matthew Amato f6d4c98f45 Add missing property typs to TypeScript smokescreen 2020-06-03 16:34:15 -04:00
Matthew Amato 7e5c468fd8 Add additional smokescreen to build-ts
1. Add a Specs/TypeScript directory with a minimal TS configuration that
uses the d.ts files generated by build-ts

2. Have `build-ts` compile index.ts from this directory which makes sure
various types actually conform to their expected interfaces.

3. Fix ImageryProvider interfaces which had issues exposed by this new
test.

In the future we can add any additional smokescreens that we think are
important to validate our definitions going forward, but this will never
be a fully exhaustive check.

We currently don't actually execute the output, it's just there for
compile-time checking.  We can revisit this if we ever feel that it's
needed.
2020-06-03 13:08:24 -04:00