Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added check for modifiersType existing in a mapped type #136

Closed

Conversation

JoshuaKGoldberg
Copy link
Contributor

@JoshuaKGoldberg JoshuaKGoldberg commented May 27, 2021

Fixes typescript-eslint/typescript-eslint#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
Copy link
Contributor Author

Closing to keep my PR queue small 👋

@JoshuaKGoldberg
Copy link
Contributor Author

Whoops, didn't mean to close this one!

Ping @ajafff - is this of interest to you?

@JoshuaKGoldberg
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[prefer-readonly-parameter-types] Cannot read property 'flags' of undefined
1 participant