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

refactor(CircuitJs): TS generator to not emit function wrapper if noir function name is a TS keyword #2966

Open
Tracked by #5070
rahul-kothari opened this issue Oct 23, 2023 · 0 comments
Labels
T-bug Type: Bug. Something is broken. T-feedback Type: recording user feedback

Comments

@rahul-kothari
Copy link
Contributor

rahul-kothari commented Oct 23, 2023

Say I write a noir function throw().
I compile my contract and generate a typescript interface.....and the interface blows up because throw() is a TS keyword!

Solution could be

  • TS generator will not emit any function named after a TS keyword, and emits something to the effect of WARNING: Function 'throw' not emitted as conflicts with keyword. Can be called via function index e.g.: contract["throw"]() You can call this method manually.
@rahul-kothari rahul-kothari added T-bug Type: Bug. Something is broken. S-needs-discussion Status: Still needs more discussion before work can start. T-feedback Type: recording user feedback labels Oct 23, 2023
@github-project-automation github-project-automation bot moved this to Todo in A3 Oct 23, 2023
@rahul-kothari rahul-kothari removed the S-needs-discussion Status: Still needs more discussion before work can start. label Oct 24, 2023
@rahul-kothari rahul-kothari changed the title Handle case of writing a noir function, whose name is a TS keyword TS generator to not emit function wrapper if noir function name is a TS keyword Oct 24, 2023
@LHerskind LHerskind changed the title TS generator to not emit function wrapper if noir function name is a TS keyword refactor(CircuitJs): TS generator to not emit function wrapper if noir function name is a TS keyword Mar 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-bug Type: Bug. Something is broken. T-feedback Type: recording user feedback
Projects
Status: Todo
Development

No branches or pull requests

1 participant