Hi,
is it possible that you didn't link the integration account to the logic app as described in:
I encountered that it's not possible to save the logic app using the online code editor if I add a JavaScript Code and the integration account isn't linked. Maybe this is why it's displayed as an invalid type.
But perhaps JavaScript Code isn't available for the VS Code Plugin yet or yours is outdated, because it's still in Preview mode in the online Logic Apps Designer.
You should try to use the online Designer for once and I'll test it with VS Code later today.
Let me know if something helped or if you found the problem.