-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/remix
SDK Version
7.93.0
Framework Version
2.5.0
Link to Sentry event
No response
SDK Setup
No response
Steps to Reproduce
https://github.com/haines/sentry-remix-type-error
Instead of doing
export const handleError = wrapRemixHandleError;attempt to call wrapRemixHandleError within an existing handleError method
export function handleError(
error: unknown,
args: ActionFunctionArgs | LoaderFunctionArgs,
): void {
wrapRemixHandleError(error, args);
// ...
}Expected Result
Code type-checks successfully.
Actual Result
TypeScript reports an error
error TS2345: Argument of type 'ActionFunctionArgs | LoaderFunctionArgs' is not assignable to parameter of type 'DataFunctionArgs'.
Type 'ActionFunctionArgs' is not assignable to type 'DataFunctionArgs'.
Types of property 'request' are incompatible.
Type 'Request' is not assignable to type 'RemixRequest'.
Type 'Request' is not assignable to type 'Record<string | symbol, RemixRequestState>'.
Index signature for type 'string' is missing in type 'Request'.
(the error is the same if you use the deprecated DataFunctionArgs type from Remix, so it's not just because of the change to use ActionFunctionArgs | LoaderFunctionArgs).
Metadata
Metadata
Assignees
Labels
Projects
Status
No status