Im working with Brano, basically what we are trying to do is to create a vue composable that returns multiple properties, as well as query with certain type that should always extend the PaginationRequestDTO interface. However the PaginationRequestDTO interface properties (pageNumber, pageSize) are constructed inside the composable and all the other properties specific to that certain type come as a parameter of the composable. So we tried to create the composable, but the query = ref(....) always gives us the mentioned error:
Argument of type 'Omit<QueryT, keyof PaginationRequestDTO> & { pageNumber: number; pageSize: number; }' is not assignable to parameter of type 'QueryT'.
'Omit<QueryT, keyof PaginationRequestDTO> & { pageNumber: number; pageSize: number; }' is assignable to the constraint of type 'QueryT', but 'QueryT' could be instantiated with a different subtype of constraint 'PaginationRequestDTO'.