Skip to content
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

Add Helper To Validate Params #11

Merged
merged 2 commits into from
Jul 12, 2022

Conversation

martinliptak
Copy link
Contributor

@martinliptak martinliptak commented Jul 12, 2022

This PR implements #10

@martinliptak martinliptak changed the title Add $params Helper Add Helper To Validate Params Jul 12, 2022

export function $params(_route: string, params: { readonly [key: string]: string | undefined }) {
return params
}
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 chosen a simple implemetation without runtime checks. $path helper works in a similar way - if you bypass type checking and pass in an incorrect route, it won't complain and won't replace params.

@martinliptak martinliptak marked this pull request as ready for review July 12, 2022 10:00
@yesmeck yesmeck merged commit 92d679a into yesmeck:master Jul 12, 2022
@github-actions
Copy link
Contributor

🎉 This PR is included in version 0.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants