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

Add type check framework #1981

Closed
wants to merge 2 commits into from
Closed

Conversation

martinpitt
Copy link
Member

@martinpitt martinpitt commented Jan 31, 2025

I'm about to do bigger changes to podman's code base. Before I start that, I'd like to TSify at least the basals, like src/client.js (not necessarily the top-level components).

Add an explicit type so that tsc does not infer that `no-pod` is a
required property. This led to

> src/Containers.jsx(668,24): error TS2790: The operand of a 'delete' operator must be optional.

Declaring it explicitly states that all keys are optional.
Copied from current cockpit-files.
@martinpitt martinpitt marked this pull request as ready for review January 31, 2025 11:19
@martinpitt martinpitt requested a review from jelly January 31, 2025 11:19
@martinpitt
Copy link
Member Author

@jelly I'm making more typescript things in a branch on top of that, so far it's a nice learning exercise (and found a bug). But you mentioned you had doubts here, so if you don't like this please reject now and I'll put this to rest.

@martinpitt martinpitt mentioned this pull request Feb 3, 2025
@martinpitt martinpitt removed the request for review from jelly February 3, 2025 08:25
@martinpitt
Copy link
Member Author

See #1987 (comment)

@martinpitt martinpitt closed this Feb 3, 2025
@martinpitt martinpitt deleted the types branch February 3, 2025 08:25
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.

1 participant