tsutils
tsutils copied to clipboard
Added check for modifiersType existing in a mapped type
Fixes https://github.com/typescript-eslint/typescript-eslint/issues/3405
The issue is that modifiersType doesn't necessarily exist in TypeScript's internal MappedType:
https://github.com/microsoft/TypeScript/blob/5fde87135f25a2dbea8a98e05438e61fdad06fe6/src/compiler/types.ts#L5431
/* @internal */
export interface MappedType extends AnonymousType {
// ...
modifiersType?: Type;
// ...
}
Co-authored-by: @kirjs
Closing to keep my PR queue small 👋
Whoops, didn't mean to close this one!
Ping @ajafff - is this of interest to you?
Closing as I've migrated to ts-api-utils. :wave: