Props API
As of 1.0.0-next.40 the props api has changed, read this guide to figure out how to change your code. Read the full changelog.
Add App Types
Section titled “Add App Types”You will need to add a file called src/app.d.ts with the following contents:
/// <reference types="jellycommands/ambient" />
// See https://jellycommands.dev/components/propsinterface Props {}Change usage of props
Section titled “Change usage of props”Props changed from being an object with methods (get, set, and has), to a regular object.
const db = props.get('db');const db = props.dbprops.set('db', database);props.db = database;Change how props are typed
Section titled “Change how props are typed”Props are now typed globally for ease of use, you can edit the Props interface in your src/app.d.ts to achieve this. No more importing types everywhere you use your props.
Accessing props in commands and events
Section titled “Accessing props in commands and events”We added the props object directly to command and event context to access it quicker:
export default command({   run({ client }) {   run({ props }) {       const db = client.props.get<DB>('db');       const db = props.db;    }})TS & JS Config
Section titled “TS & JS Config”If you are using TypeScript you should have a tsconfig.json in your project, similiarly if you are using JavaScript you should have a jsconfig.json in your project. They should both look something like this:
{  "compilerOptions": {    "lib": ["ESNext"],    "module": "ESNext",    "target": "ESNext",    "esModuleInterop": true,    "forceConsistentCasingInFileNames": true,    "moduleResolution": "node",    "resolveJsonModule": true,    "strict": true,    "checkJs": true,    "allowJs": true  },  "include": ["./src/**/*.js", "./src/**/*.ts"]}Erroring
Section titled “Erroring”Props previously threw an error when you tried to access soemthing that didn’t exist, this is no longer the case.