Open guillaumebrunerie opened 1 year ago
Using unknown
would be indeed more strict, but doing so also will break many many existing codes, so I'm not sure we can do this. This at least requires some kind of conditional compiling.
Is it possible to do it only for future APIs? Or would it automatically apply to existing APIs as well?
Is it possible to do it only for futurs APIs?
Technically possible but the generator will need to maintain a big list of 'old APIs'. And that will also break consistency.
From what I understand, this library uses an automated system to read the specs and extract the types from them. Occasionally the spec does not specify any type and so this library defaults to
any
(for instance see #1237 forstructuredClone
).I'd like to suggest to modify the tool to use
unknown
instead by default (and never useany
), to err on the side of type safety.