postgrest-js
postgrest-js copied to clipboard
Function interface type
Bug report
export type Json =
| string
| number
| boolean
| null
| { [key: string]: Json }
| Json[];
export interface Database {
cadastro: {
Tables: {
[_ in never]: never;
};
Views: {
[_ in never]: never;
};
Functions: {
aval_imoveis: {
Args: { inscricao_imobiliaria: string };
Returns: Example;
};
};
Enums: {
[_ in never]: never;
};
};
}
interface Example {
prop: string;
}
Describe the bug
Why putting an interface on the Returns property I get an array type when using the postgrest client?
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
Just add a custom Interface on the ´Returns` property and use the client with the specific function
Expected behavior
I don't know if it's a bug or I'm using the interface of the supabase client wrong
Screenshots

System information
- Version of supabase-js:
"@supabase/postgrest-js": "^1.1.0", - Version of Node.js:
"16.18.1,