diff --git a/docs/rest/api/RestEndpoint.md b/docs/rest/api/RestEndpoint.md index 72e45402c361..fa04b026b554 100644 --- a/docs/rest/api/RestEndpoint.md +++ b/docs/rest/api/RestEndpoint.md @@ -202,12 +202,17 @@ import { Todo } from './Todo'; const getTodo = new RestEndpoint({ path: '/', schema: Todo }); // Hover your mouse over 'todo' to see its type const todo = useSuspense(getTodo); + +async () => { + const ctrl = useController(); + const todo2 = await ctrl.fetch(getTodo); +}; ``` -[process](#process) determines the resolution value when the endpoint is called directly. Otherwise this will be `any` to -ensure compatibility. +[process](#process) determines the resolution value when the endpoint is called directly. For +`RestEndpoints` without a schema, it also determines the return type of [hooks](/docs/api/useSuspense) and [Controller.fetch](/docs/api/Controller#fetch).