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
- TEAM INVITE
There is a problem with the team invitation. When a user invites other users, that time, the newly created email address they don't get the invite link and old ...
- education plan not activated
Hi I have an edu id 13103046@iubat.edu but when I am trying to claim my plan and trying to logging with github where education student plan active. the appwrite...
- I'm getting an error on the console "j?....
On my self hosted instance version 1.8.1 the console is giving me this error when trying to view the rows for a table I recently created. My application is read...