Better types in examples
This adds a lot of types, but also includes some code improvements.
- wms-custom-proj did some unnecessary steps when converting between projections
- The Edit button to edit on codesandbox now uses the 'dev' tag as the version instead of an non-existent version like
v10.4.1-dev - Some examples updated their style on each pointermove event instead of only when the selection changes
📦 Preview the website for this branch here: https://deploy-preview-16628--ol-site.netlify.app/.
I appreciate the work you’ve done here, but fear it may just be undone over time if there is nothing enforcing stricter type checking. I know that I have removed type casts over time when I come across one that isn’t required (or isn’t being enforced).
Is there a setting that you’re working with that complains about the unknown types? Can we incrementally add checks to ensure the work you’ve done isn’t undone?
This PR here adds types to all cases that were obvious to me. For the reset I'd appreciate some help. But in case there is no solution we can add // ts-ignore.
Then "examples/**/*.js", can be permanently added to tsconfig.json.
@tschaub I added "examples/**/*.js", " to the tsconfig.json, and explicitly excluded those that do not yet pass.
Hi Great work, congratulations, but my knowledge doesn't allow me to understand the benefits of variable typing in examples. So, without understanding the benefits of this typing, I only see it as complicating the code and moving away from simple, basic JavaScript, which should remain so for our examples...???