5 lines
166 B
TypeScript
5 lines
166 B
TypeScript
const fetchJSON = <T>(...args: [RequestInfo, RequestInit?]): Promise<T> =>
|
|
fetch(...args).then((response: Response) => response.json());
|
|
|
|
export default fetchJSON;
|