refactor: rewrite function using es6 for consistency

main
Josue 4 years ago committed by Tsu-ba-me
parent 73af9f6e57
commit 431b88aa11
  1. 4
      striker-ui/lib/fetchers/fetchJSON.ts

@ -1,5 +1,5 @@
function fetchJSON<T>(...args: [RequestInfo, RequestInit?]): Promise<T> {
const fetchJSON = <T>(...args: [RequestInfo, RequestInit?]): Promise<T> => {
return fetch(...args).then((response: Response) => response.json());
}
};
export default fetchJSON;

Loading…
Cancel
Save