node-yahoo-finance2
node-yahoo-finance2 copied to clipboard
Schema gen should handle dependencies in watch mode
Currently, the schema generator, when it watch mode (--watch), only recreates direct schemas and not dependencies.
i.e.
If you edit quote.ts (which contains the @yf-schema pragma), quote.schema.json will be re-created.
However, the latter is imported also by options.ts, leading to incorrect types.
The easy workaround for now is to simply re-create all schemas with:
$ deno task schema -f
but it means you need to remember to do so on relevant files. It would be great if watch mode could track dependencies too. We could start with direct dependencies of depth 1. Not hard to do, just need to find time.