deep-foundation / deep-foundation/deepcase-app

Add possibility to write tsx in tsx

Open
#302 0 comments 0 reactions 1 assignee Claimed by @konard View on GitHub
enhancement
Dominant language
TypeScript
Stars
10
Forks
6
PR merge metrics
No merged PRs in 30d

Description

# Description
I want to write code like this:
```tsx
import { DeepClient } from "@deep-foundation/deeplinks/imports/client";
import type { Link } from "@deep-foundation/deeplinks/imports/minilinks";

async ({ deep }: {deep: DeepClient}) => {
const React = await deep.import('react');
const { Box } = await deep.import('@chakra-ui/react');

return ({ style, link }: {style: object, link: Link}) => {
return
UI for {link?.id || 0} goes here.

}
}
```
And see its preview. But the only thing I see is error `editor evalClientHandler error SyntaxError: Unexpected token 'export'`

# Expected Behavior
This code to work

# Actual behavior
This code not working

# Why I need this
I write in VSCode and like to have strong types and auto completion. I write this way for async handlers by using workaround (removing export statement in output code). I think we should fix this for both types of handlers

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.