tsutils icon indicating copy to clipboard operation
tsutils copied to clipboard

Added check for modifiersType existing in a mapped type

Open JoshuaKGoldberg opened this issue 4 years ago • 2 comments

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

JoshuaKGoldberg avatar May 27 '21 18:05 JoshuaKGoldberg

Closing to keep my PR queue small 👋

JoshuaKGoldberg avatar Jul 14 '21 16:07 JoshuaKGoldberg

Whoops, didn't mean to close this one!

Ping @ajafff - is this of interest to you?

JoshuaKGoldberg avatar Jul 14 '21 16:07 JoshuaKGoldberg

Closing as I've migrated to ts-api-utils. :wave:

JoshuaKGoldberg avatar Apr 25 '23 21:04 JoshuaKGoldberg