geostyler / geostyler-style

Style declaration files for the GeoStyler project
https://geostyler.github.io/geostyler-style/docs/master/
BSD 2-Clause "Simplified" License
16 stars 15 forks source link

Improve Typings #573

Open KaiVolland opened 1 year ago

KaiVolland commented 1 year ago

Currently there are some minor issue with the types of the geostyler-style. We should check if we can improve these types without breaking changes.

  1. GeoStylerFunction is a union type of all functions. This leads to issues with the (currently two) functions that don't have args. In particular TypesScript says that a GeoStylerFunction has no property args unless you exclude the functions without args. We should avoid adding an empty array as args but find a TypeScript way for this.

  2. PropertyType includes unknown. This translates to PropertyType = unknown which is obviously not perfect.