All, I am struggling to understand the best way to type a return value from the json() call from the REST API in the new v6 of amplify.
import { get } from "@aws-amplify/api";
const operation = await get({
apiName: "todo",
path: "/todos",
}).response;
const json = await response.body.json();
The type of json is DocumentType is there a way to control that type through a generic?
I am missing something obvious and my googling is NOT helping me 😦
Thanks for any/all help.