Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ol/feature): infer type for
feature.getProperties()
with this change it's possible to infer the type `T` of passed properties when calling `feature.getProperties()` and using with TypeScript. ```ts type Vehicle = { type: 'Car' | 'Bike' | 'Truck', color: string } const car: Vehicle = { type: 'Car', color: 'Red' } // Before the change const feature = new RenderFeature(car); const properties = feature.getProperties(); // properties inferred as Object<string, *> // After the change const feature = new RenderFeature(car); const properties = feature.getProperties(); // properties inferred as Vehicle ``` closes #14868
- Loading branch information