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<number>}) => {
return <Box
style={{ width: 300, height: 300, ...style }}
bg={'bgColor'}
color={'text'}
borderColor={'borderColor'}
borderWidth='1px'
borderRadius='lg'
padding={1}
>
UI for {link?.id || 0} goes here.
</Box>
}
}
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
Description
I want to write code like this:
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