electrode-native icon indicating copy to clipboard operation
electrode-native copied to clipboard

Update file format when generating api

Open zaferbozkurt opened this issue 3 years ago • 3 comments

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

VSCode intellisense not working with generated js files.

zaferbozkurt avatar Jan 20 '22 10:01 zaferbozkurt

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jan 20 '22 10:01 CLAassistant

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?

friederbluemle avatar Jan 21 '22 04:01 friederbluemle

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.

zaferbozkurt avatar Feb 02 '22 13:02 zaferbozkurt