-
Notifications
You must be signed in to change notification settings - Fork 441
build(types): improve type safety in some utils #7863
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
base: main
Are you sure you want to change the base?
build(types): improve type safety in some utils #7863
Conversation
Removes `@ts-expect-error` suppressions in `src/utils/shell.ts` and `src/utils/dot-env.ts` by introducing proper type guards and explicit types. - In `shell.ts`, adds a type assertion to correctly handle the `execa` result when `reject: false` is used. - In `dot-env.ts`, adds explicit types to function parameters and uses a type predicate with `.filter()` to correctly narrow array types. This also resolves downstream type errors in `dev.ts`.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
looks like you need to reformat |
Good catch! I've run the formatter now. |
Removes `@ts-expect-error` suppressions in `src/utils/shell.ts` and `src/utils/dot-env.ts` by introducing proper type guards and explicit types. - In `shell.ts`, adds a type assertion to correctly handle the `execa` result when `reject: false` is used. - In `dot-env.ts`, adds explicit types to function parameters and uses a type predicate with `.filter()` to correctly narrow array types. This also resolves downstream type errors in `dev.ts`. chore: format code
Removes `@ts-expect-error` suppressions in `src/utils/shell.ts` and `src/utils/dot-env.ts` by introducing proper type guards and explicit types. - In `shell.ts`, adds a type assertion to correctly handle the `execa` result when `reject: false` is used. - In `dot-env.ts`, adds explicit types to function parameters and uses a type predicate with `.filter()` to correctly narrow array types. This also resolves downstream type errors in `dev.ts`. chore: format code
Removes `@ts-expect-error` suppressions in `src/utils/shell.ts` and `src/utils/dot-env.ts` by introducing proper type guards and explicit types. - In `shell.ts`, adds a type assertion to correctly handle the `execa` result when `reject: false` is used. - In `dot-env.ts`, adds explicit types to function parameters and uses a type predicate with `.filter()` to correctly narrow array types. This also resolves downstream type errors in `dev.ts`.
Removes `@ts-expect-error` suppressions in `src/utils/shell.ts` and `src/utils/dot-env.ts` by introducing proper type guards and explicit types. - In `shell.ts`, adds a type assertion to correctly handle the `execa` result when `reject: false` is used. - In `dot-env.ts`, adds explicit types to function parameters and uses a type predicate with `.filter()` to correctly narrow array types. This also resolves downstream type errors in `dev.ts`.
Removes `@ts-expect-error` suppressions in `src/utils/shell.ts` and `src/utils/dot-env.ts` by introducing proper type guards and explicit types. - In `shell.ts`, adds a type assertion to correctly handle the `execa` result when `reject: false` is used. - In `dot-env.ts`, adds explicit types to function parameters and uses a type predicate with `.filter()` to correctly narrow array types. This also resolves downstream type errors in `dev.ts`.
|
you... undid the changes from |
You were right! I'd accidentally reverted some changes from |
Removes `@ts-expect-error` suppressions in `src/utils/shell.ts` and `src/utils/dot-env.ts` by introducing proper type guards and explicit types. - In `shell.ts`, adds a type assertion to correctly handle the `execa` result when `reject: false` is used. - In `dot-env.ts`, adds explicit types to function parameters and uses a type predicate with `.filter()` to correctly narrow array types. This also resolves downstream type errors in `dev.ts`.
This submission removes several
@ts-expect-errorcomments and improves the overall type safety of the codebase by fixing the underlying type issues insrc/utils/shell.tsandsrc/utils/dot-env.ts.PR created automatically by Jules for task 12215694966020416008 started by @serhalp