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

Reduce the use of `overrideType`

Open saschanaz opened this issue 3 years ago • 2 comments

overrideType is intended to be the last resort, but the existing uses confuse people and incorrectly guide them to use it when it's not the ideal way. See also https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1196

saschanaz avatar Nov 18 '21 19:11 saschanaz

Could add a danger rule on PRs which just change the JSON, the hard bit from my side is knowing what to recommend?

orta avatar Nov 19 '21 13:11 orta

It's always better to override the other fields, if possible:

https://github.com/microsoft/TypeScript-DOM-lib-generator/blob/315f15aee7a2d5c6d830ea90872fbd4e51fbbbd2/src/build/types.d.ts#L2-L4

saschanaz avatar Nov 19 '21 13:11 saschanaz