chore: fix lint warning
This commit is contained in:
1 file changed
+2
-1
@@ -1,11 +1,12 @@
|
||||
import { responseCatch } from './response-catch'
|
||||
|
||||
export const responseJSON = async <T>(res: Response) =>
|
||||
export const responseJSON = async <T>(res: Response): Promise<T> =>
|
||||
responseCatch(res)
|
||||
.then(async (res) => {
|
||||
const text = await res.text()
|
||||
|
||||
try {
|
||||
// eslint-disable-next-line @masknet/type-prefer-return-type-annotation
|
||||
return JSON.parse(text) as T
|
||||
}
|
||||
catch {
|
||||
|
||||
Reference in new issue
Block a user