Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/elysia
SDK Version
v. 10.53.1
Framework Version
Elysia v. 1.4.28
Link to Sentry event
No response
Reproduction Example/SDK Setup
import { Elysia } from 'elysia';
import * as Sentry from '@sentry/elysia';
Sentry.init({
dsn: 'foobar',
sendDefaultPii: true,
});
const app = Sentry.withElysia(new Elysia({ prefix: '/api' }))
.get('/', () => 'ok')
.listen(3000);
console.log(
`Server running at http://${app.server?.hostname}:${app.server?.port}`,
);
Steps to Reproduce
Try to add config.prefix for Elysia instance.
Expected Result
Adding config.prefix should not throw type errors.
Actual Result
Argument of type 'Elysia<"/api", { decorator: {}; store: {}; derive: {}; resolve: {}; }, { typebox: {}; error: {}; }, { schema: {}; standaloneSchema: {}; macro: {}; macroFn: {}; parser: {}; response: {}; }, {}, { derive: {}; resolve: {}; schema: {}; standaloneSchema: {}; response: {}; }, { ...; }>' is not assignable to parameter of type 'Elysia<"", { decorator: {}; store: {}; derive: {}; resolve: {}; }, { typebox: {}; error: {}; }, { schema: {}; standaloneSchema: {}; macro: {}; macroFn: {}; parser: {}; response: {}; }, {}, { derive: {}; resolve: {}; schema: {}; standaloneSchema: {}; response: {}; }, { ...; }>'.
The types of 'config.prefix' are incompatible between these types.
Type '"/api" | undefined' is not assignable to type '"" | undefined'.
Type '"/api"' is not assignable to type '""'.ts(2345)
Additional Context
No response
Priority
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it.
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/elysia
SDK Version
v. 10.53.1
Framework Version
Elysia v. 1.4.28
Link to Sentry event
No response
Reproduction Example/SDK Setup
Steps to Reproduce
Try to add
config.prefixfor Elysia instance.Expected Result
Adding
config.prefixshould not throw type errors.Actual Result
Additional Context
No response
Priority
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding
+1orme too, to help us triage it.