![]()
Await Widget Types
TypeScript declarations for Await widgets.
What's Included
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
Install
npm install -D @await-widget/runtime
tsconfig
{
"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,
});
License
MIT