TypeScript-DOM-lib-generator icon indicating copy to clipboard operation
TypeScript-DOM-lib-generator copied to clipboard

Use unknown instead of any in automatically generated definitions

Open guillaumebrunerie opened this issue 2 years ago • 3 comments

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 for structuredClone).

I'd like to suggest to modify the tool to use unknown instead by default (and never use any), to err on the side of type safety.

guillaumebrunerie avatar Feb 26 '23 09:02 guillaumebrunerie