blake-mealey / mantle

An infrastructure-as-code and deployment tool for Roblox.
https://mantledeploy.vercel.app/
MIT License
85 stars 11 forks source link

New Id type for better type safeguard. agrenst using wrong Id to call a function #210

Closed Boegie19 closed 6 months ago

Boegie19 commented 8 months ago

Current PR is an example version if the maintainer wants the change I will continue with this PR

What does it do?

Adds a ID type currently with only 2 valid IDs

I call into on whatever the function gets so you can give it a u64 and it will auto convert it to a Id

Why is it needed?

To make the api better.

Reason to say no to this.

This will add extra complexity to the codebase the question in the end is the extra complexity worth it for the added saveguard?

This is a breaking chance since we change the input and output types.

vercel[bot] commented 8 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
mantle-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 14, 2024 9:06pm
blake-mealey commented 6 months ago

Thanks for the PR. I'd like to investigate this approach some more another time but for now I'm going to close this.