Skip to content

frontend: Replace ts-ignore with proper type fixes#5061

Open
skoeva wants to merge 1 commit intokubernetes-sigs:mainfrom
skoeva:ts-things
Open

frontend: Replace ts-ignore with proper type fixes#5061
skoeva wants to merge 1 commit intokubernetes-sigs:mainfrom
skoeva:ts-things

Conversation

@skoeva
Copy link
Copy Markdown
Contributor

@skoeva skoeva commented Apr 6, 2026

These changes replace @ts-ignore suppressions with proper fixes across three files:

  • KubeObject.ts - targeted function casts on delete and patch spread calls
  • hooks.ts - Object.assign tuple pattern to satisfy the intersection return type
  • graphLayout.tsx - added missing label? field to ElkEdgeWithoutData

@skoeva skoeva self-assigned this Apr 6, 2026
@skoeva skoeva added frontend Issues related to the frontend quality Related to improving the quality of the app labels Apr 6, 2026
@k8s-ci-robot k8s-ci-robot requested review from ashu8912 and sniok April 6, 2026 12:11
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Apr 6, 2026
Copy link
Copy Markdown
Member

@ashu8912 ashu8912 left a comment

Choose a reason for hiding this comment

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

Nice one, LGTM!!

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ashu8912, skoeva

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 7, 2026

// @ts-ignore
return this._class().apiEndpoint.delete(...args, params, this._clusterName);
return (this._class().apiEndpoint.delete as (...args: any[]) => Promise<any>)(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think these should be "any"?


// @ts-ignore
return this._class().apiEndpoint.patch(...args, {}, this._clusterName);
return (this._class().apiEndpoint.patch as (...args: any[]) => Promise<any>)(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Also, the any here I think is wrong.

(It is a bit better than using ts-ignore)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. frontend Issues related to the frontend quality Related to improving the quality of the app size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants