Search…
Exporting Code
Export code components in Javascript or Typescript formats
In Quest, you can choose to export code for a single Component or an entire App. Depending on your prefered language, you can download them as either Javascript or Typescript.

Exporting code for a single component

The Export Code dialog for individual components
From the Components tab, open the component for which you want to export the code. The component will open in the Quest Editor. From here you can press the export icon at the top to launch the Export Code dialog, where you can choose JS or TS format to export. The default option will be based on what you set as your preference in the Export Settings for your App.

Exporting code for an entire App

The Export Settings for an entire App
From the Workspaces tab on the left sidebar, select the Workspace + App you want to export. From here you're able to download the entire App as either Javascript or Typescript.

Contents of the Code Components

Both Javascript and Typescript export formats contain 3 types of files: a component UI file, a use hook file (if necessary based on your props and bindings) and the image assets folder. When you export an entire App, image assets from all the components are grouped into one assets folder. Also, when exporting and App, you have the option to include any custom fonts you may have uploaded.
If you choose the Typescript format, you may get an additional file called “types.ts”.
The type.ts generated file
This contains all props with types set to "any" to start. If you export a single component from the Quest Editor, you'll get this file with only the relevant types to that component but if you export the entire App, you'll get all types from all components included in the file.
You can modify this file locally to set more specific types as you see fit. Be sure to selectively update this file with any new components you create. Make sure you do not simply overwrite the "types.ts" file as you will reset all types to "any” and potentially lose the edits you had made. Checking for diffs before merging is also a great way to avoid overwriting your custom changes.