Skip to content

Conversation

@mn4367
Copy link
Contributor

@mn4367 mn4367 commented Dec 2, 2025

Added types and updated docs for preRewrite.

types/index.d.ts Outdated
preHandler?: preHandlerHookHandler;
beforeHandler?: preHandlerHookHandler;
preValidation?: preValidationHookHandler;
preRewrite?: (url: string, params: unknown, prefix: string) => string;
Copy link
Member

Choose a reason for hiding this comment

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

Can you add a test for this type? We use tsd.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've never worked with tsd so the latest commit is just a best guess, please take a look.

Copy link
Member

Choose a reason for hiding this comment

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

Can you follow the same structure as before? define a preRewriteHookHandler type.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done and squashed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, managed to destroy my fork completely, created a new PR #442.

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.

2 participants