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

"Statements are not allowed in ambient contexts." #11

Open
jakelowen opened this issue Aug 9, 2018 · 3 comments
Open

"Statements are not allowed in ambient contexts." #11

jakelowen opened this issue Aug 9, 2018 · 3 comments

Comments

@jakelowen
Copy link

It seems recently every time I modify my schema and run yarn gen-schema-types the resulting schema.d.ts file contains a couple tslint errors "Statements are not allowed in ambient contexts." due to extra semicolons. It is easy enough to manually fix by hand.

Does this happen to you? Any idea how to fix?

@benawad
Copy link
Owner

benawad commented Aug 9, 2018

I have tslint ignore that file. After I create the file I append a tslint ignore

@jakelowen
Copy link
Author

Sorry I misspoke.. It appears to be a tsc error and not a tslint error. It happens consistently, but I find that prettier will automatically fix the file if I just drop my cursor in anyway and hit save. Not a big deal, just a small annoyance.

@benawad
Copy link
Owner

benawad commented Aug 13, 2018

I haven't come across that, but you can run prettier programmatically. You could create a script that generates the types and then runs prettier on the file

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

2 participants