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

codegen:generate Unable to bypass comments in ts manifest #2130

Open
bz888 opened this issue Oct 30, 2023 · 0 comments
Open

codegen:generate Unable to bypass comments in ts manifest #2130

bz888 opened this issue Oct 30, 2023 · 0 comments

Comments

@bz888
Copy link
Contributor

bz888 commented Oct 30, 2023

Description

Generate will not be able to filter existing functions/events if there are commented code. As it is using regex to process the ts-manifest. To solve this the best solution is to move away from Regex and instead use the Typescript AST to parse and modify the code.

To do this we can use the Typescript API or possibly even better is ts-morph

Example failing test

This test will be passing once the problem is fixed

it('tsExtractor should extract existing events and functions from ts-manifest', () => {

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

No branches or pull requests

1 participant