RoxGameOriginal post
Rank 1: Thread
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
Summary
Developers encountered an issue where the type 'Theme' did not satisfy the constraint 'Row' due to missing properties. The solution is to extend the 'Theme' interface to include the missing properties from the 'Row' type. Example code provided. Following the outdated documentation led to this problem. Concerns about using the CLI to generate types without causing many project changes were also mentioned.