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

Update file format when generating api #1855

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

zaferbozkurt
Copy link

Updated the format of the js files exported with "ern regen-api".

VSCode intellisense not working with generated js files.

@CLAassistant
Copy link

CLAassistant commented Jan 20, 2022

CLA assistant check
All committers have signed the CLA.

@friederbluemle
Copy link
Member

Hi @zaferbozkurt - Thanks for the PR.
I have not tested it locally yet, but I don't think just changing the file extensions make these files valid TypeScript files. There are (currently) no type annotations in the generated api files, so it really is just plain JavaScript.
Can you explain a bit more what you mean by "VSCode intellisense not working" - Is it possible to make VS Code recognize these files?

@zaferbozkurt
Copy link
Author

Hi @zaferbozkurt - Thanks for the PR.
I have not tested it locally yet, but I don't think just changing the file extensions make these files valid TypeScript files. There are (currently) no type annotations in the generated api files, so it really is just plain JavaScript.
Can you explain a bit more what you mean by "VSCode intellisense not working" - Is it possible to make VS Code recognize these files?

Hi @friederbluemle, sorry for late reply.

When we import api in VSCode we get the following error and while using the api, we can’t view the methods with intellisense.

Screen Shot 2022-02-02 at 15 07 40

I agree these files not fully valid typescript. Flow type added to JS files. Therefore, simply converting the file extension to typescript will solve the error and intellesense.

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

Successfully merging this pull request may close these issues.

3 participants