quokka icon indicating copy to clipboard operation
quokka copied to clipboard

Feature Request: allow types on imported modules in scratch files in VS Code

Open babakness opened this issue 6 years ago • 1 comments

Issue description or question

This is related to #347, making a feature request here

Sample Code

See #347

Feature Request

It would be great if using the Install Missing Package Only For Quokka feature allowed for type information on TypeScript files in VS Code; perhaps by revealing an alternative path for VS Code and the TypeScript compile to check on Quokka only scratch files. This is the image of the exact feature in question:

image

To clarify: in VS Code types are resolved in scratch files just not for imported modules when not included in the node_modules directory (only for Quokka file). Module types do work when the module is installed into the local project.

Perhaps it is possible to define an alternate path used by Quokka for VS Code to use to resolve modules. This image shows that the editor does not see the module installed by Quokka for scratch-file only purposes (note the red marking below the file)

Again, perhaps it is possible to configure the editor to check also resolve modules from where Quokka stores modules for a temporary time, ie .quokka/node_modules or where that may be.

babakness avatar Mar 27 '19 18:03 babakness

it is possible to see types, if you save the file and then use run on save. see my write up in https://github.com/wallabyjs/quokka/issues/347#issuecomment-494444511

barakplasma avatar May 21 '19 15:05 barakplasma