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

monorepo: cleanup ts-ignore and ts-expect-error #3361

Merged
merged 1 commit into from
Apr 22, 2024

Conversation

gabrocheleau
Copy link
Contributor

@gabrocheleau gabrocheleau commented Apr 22, 2024

This PR cleanups several instances where ts-ignore or ts-expect-errors was used, instead replacing them with less intrusive TypeScript solutions.

Notably, these TypeScript tags were very often used to ignore TS errors related to access of protected object properties. Instead, these properties can be accessed (without error) by the string literal.

Here's an example:

 TS error:
if (this._eciesSession._gotEIP8Auth) {

No TS error:
if (this._eciesSession['_gotEIP8Auth']) {

Copy link
Member

@holgerd77 holgerd77 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, LGTM! 🙂👍

block.transactions = transactions

if (transactions.some((t) => t.supports(Capability.EIP1559FeeMarket))) {
// @ts-ignore overwrite read-only property
// @e read-only property
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won’t make it a blocker, but this and above seems like a leftover?

@holgerd77 holgerd77 merged commit 9631d98 into master Apr 22, 2024
34 checks passed
@holgerd77 holgerd77 deleted the monorepo/remove-ts-expect-errors branch April 22, 2024 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants