Skip to content

Conversation

aiktb
Copy link

@aiktb aiktb commented Sep 13, 2025

I always use "exactOptionalPropertyTypes": true, in TypeScript, so authToken? string and authToken?: string | undefined; are not equivalent. In short, the former type will cause the following code to have a TypeScript error:

  vite: () => ({
    plugins: [
      sentryVitePlugin({
        authToken: undefined,
      }),
    ],
  }),

Like this:
image

Updates type definition for optional property to include explicit undefined,
improving clarity and consistency in type annotations.
@Copilot Copilot AI review requested due to automatic review settings September 13, 2025 10:12
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR clarifies the type definition for the authToken property by making the undefined type explicit in the union type.

  • Updated the authToken property type from optional to explicitly include undefined in the union type

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@aiktb
Copy link
Author

aiktb commented Sep 18, 2025

Why is the test failing? It doesn't seem to be related to my commit.

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