Skip to content

Commit

Permalink
feat: remove ts-ignore
Browse files Browse the repository at this point in the history
Ensure value is a number.
Expand type to allow getInitialProps.
This allows us to remove ts-ignore which Vercel doesn't seem to like. Which leads to a failing build.
  • Loading branch information
alextes committed Oct 11, 2024
1 parent 48fcf1f commit 7de18e2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/mainsite/components/BlobFeesWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ const baseOptions: Highcharts.Options = {
fontWeight: "300",
},
formatter: function () {
//@ts-ignore
return this.value < 1e-5 ? this.value.toExponential() : this.value;
const value = Number(this.value);
return value < 1e-5 ? value.toExponential() : value;
},
},
title: undefined,
Expand Down
4 changes: 1 addition & 3 deletions src/pages/_error.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,7 @@ const ErrorPage: FC<{ error?: Error; statusCode?: number }> = ({
);
};

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unreachable code error
ErrorPage.getInitialProps = ({ res, err }: { res: unknown; err: unknown }) => {
(ErrorPage as FC & { getInitialProps: any }).getInitialProps = ({ res, err }: { res: unknown; err: unknown }) => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const statusCode = res
? (res as { statusCode?: number }).statusCode
Expand Down

0 comments on commit 7de18e2

Please sign in to comment.