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
- Dev Keys not working
looks like dev key are broken they simply don't work i suggest remove them until you have them working otherwise they confuse devs took me few minutes trying ...
- Stuck migrating from supabase
Hello, I'm getting a 500 (Internal Server Error) when migrating from Supabase using the cloud console migration tool. Validation says error: "Couldn’t load reso...
- Custom Domain TLS Error (perfinso.com)
Hey Appwrite team/community, I need urgent help with a custom domain setup! I've added perfinso.com to my project, pointed the nameservers, and verification is...