Type 'Theme' does not satisfy the constraint 'Row'. Type 'Theme' is missing the following properties from type 'Row': $id, $sequence, $tableId, $databaseId, and 3 more.
interface Theme {
Background: string;
Secondary: string;
FontPrimary: string;
FontSecondary: string;
Icons: string;
Shadow: string;
}
export const GetTheme = query(async () => {
const { tablesDB } = getAdminServices();
var theme = await tablesDB.listRows<Theme>({
databaseId: '******',
tableId: 'theme',
queries: [Query.limit(1)]
});
return theme;
});
how to fix that problem am doing types manually
i don't want to use Cli to generate the types cause it rise a lot of changes in my project when i call appwrite init project
i follow this example at step 8 https://appwrite.io/docs/quick-starts/node
doc seems outdated
found the solution i just have to extend the row
interface Theme extends Models.Row {
Background: string;
Secondary: string;
FontPrimary: string;
FontSecondary: string;
Icons: string;
Shadow: string;
}
Recommended threads
- Helping in unblock my account
I deleted my Appwrite Cloud account that was linked via GitHub. Now I activated my GitHub Student Pack and want to sign up again using the same GitHub account, ...
- Not allowed permission to upsert a prese...
```js const presenceID = ID.unique(); setPID(presenceID); const presence = await presences.upsert({ presenceId: presenceID, status: "online"...
- Finding job
Hi. I am a full-stack developer with experience in developing scalable and user-friendly web applications. I handle both front-end and back-end development, im...