App Types
JellyCommands provides ambient types to improve the type saftey of parts of your app.
Setup
You should create a file called src/app.d.ts
, if you create-jellycommands
this will already be setup for you.
ts
/// <reference types="jellycommands/ambient" />
// See https://jellycommands.dev/guide/props.html
interface Props {}
The jellycommands/ambient
module contains our ambient type defaults which you can override in your app.d.ts
Imports
Since we are using ambient type declarations
you can't use top level import
statements, instead you should use inline import()
. For example:
ts
interface Props {
test: import('./test').HelloWorld
}