TypeScript declarations for Await widgets.
This package replaces the local paths setup used by widget templates. It provides:
- the
awaitmodule for components such asText,Image,VStack, andButton - the
await/jsx-runtimemodule forjsxImportSource - global Await bridge APIs such as
Await,AwaitStore, andAwaitNetwork - the Await JSX constraints, including no native HTML intrinsic elements
npm install -D @await-widget/runtime{
"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "await",
"types": ["@await-widget/runtime"]
}
}After that, widget source can keep importing components from await:
import { Text, VStack } from "await";
function widget() {
return (
<VStack>
<Text value="Hello, Await" />
</VStack>
);
}
Await.define({
widget,
});MIT