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

[isTypeReadonly] options parameter should be optional #4410

Closed
3 tasks done
RebeccaStevens opened this issue Jan 8, 2022 · 0 comments · Fixed by #4415
Closed
3 tasks done

[isTypeReadonly] options parameter should be optional #4410

RebeccaStevens opened this issue Jan 8, 2022 · 0 comments · Fixed by #4415
Labels
accepting prs Go ahead, send a pull request that resolves this issue enhancement New feature or request package: type-utils Issues related to the @typescript-eslint/type-utils package

Comments

@RebeccaStevens
Copy link
Contributor

RebeccaStevens commented Jan 8, 2022

  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.
  • I have read the FAQ and my problem is not listed.

Repro

isTypeReadonly(checker, type)

Expected Result

A boolean.

Actual Result

Error, 3 params required.

Additional Info

options: ReadonlynessOptions,

Versions

package version
@typescript-eslint/type-utils 5.9.0
@typescript-eslint/type-utils 5.9.0
TypeScript 4.5.4
node 17.1.0

Also note the error in the template in Versions: @typescript-eslint/type-utils's version is requested twice. I assume there is supposed to be only one or one is supposed to be @typescript-eslint/experimental-utils

@RebeccaStevens RebeccaStevens added the triage Waiting for maintainers to take a look label Jan 8, 2022
RebeccaStevens added a commit to RebeccaStevens/typescript-eslint that referenced this issue Jan 9, 2022
@RebeccaStevens RebeccaStevens changed the title isTypeReadonly options should be optional [isTypeReadonly] options parameter should be optional Jan 9, 2022
@bradzacher bradzacher added enhancement New feature or request package: type-utils Issues related to the @typescript-eslint/type-utils package accepting prs Go ahead, send a pull request that resolves this issue and removed triage Waiting for maintainers to take a look labels Jan 11, 2022
bradzacher pushed a commit that referenced this issue Jan 17, 2022
* fix(type-utils): make isTypeReadonly's options param optional

fix #4410

* test(type-utils): add basic tests for isTypeReadonly
bradzacher pushed a commit that referenced this issue Jan 17, 2022
…eadonly (#4417)

* fix(type-utils): make isTypeReadonly's options param optional

fix #4410

* test(type-utils): add basic tests for isTypeReadonly

* test(type-utils): add test for IndexSignature internals

* fix(type-utils): check IndexSignature internals when checking isTypeReadonly

fix #3714

* perf(type-utils): don't test IndexSignature key for readonlyness as it will always be readonly

Co-authored-by: Josh Goldberg <joshuakgoldberg@outlook.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 11, 2022
lonyele pushed a commit to lonyele/typescript-eslint that referenced this issue Feb 12, 2022
…nt#4416)

* fix(type-utils): make isTypeReadonly's options param optional

fix typescript-eslint#4410

* test(type-utils): add basic tests for isTypeReadonly
lonyele pushed a commit to lonyele/typescript-eslint that referenced this issue Feb 12, 2022
…eadonly (typescript-eslint#4417)

* fix(type-utils): make isTypeReadonly's options param optional

fix typescript-eslint#4410

* test(type-utils): add basic tests for isTypeReadonly

* test(type-utils): add test for IndexSignature internals

* fix(type-utils): check IndexSignature internals when checking isTypeReadonly

fix typescript-eslint#3714

* perf(type-utils): don't test IndexSignature key for readonlyness as it will always be readonly

Co-authored-by: Josh Goldberg <joshuakgoldberg@outlook.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepting prs Go ahead, send a pull request that resolves this issue enhancement New feature or request package: type-utils Issues related to the @typescript-eslint/type-utils package
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants