fetchJson.js 471 B

12345678910111213
  1. import { __awaiter, __generator } from "tslib";
  2. import { fetchOrThrow } from './fetchOrThrow';
  3. export function fetchJson(uri) {
  4. return __awaiter(this, void 0, void 0, function () {
  5. return __generator(this, function (_a) {
  6. switch (_a.label) {
  7. case 0: return [4 /*yield*/, fetchOrThrow(uri)];
  8. case 1: return [2 /*return*/, (_a.sent()).json()];
  9. }
  10. });
  11. });
  12. }
  13. //# sourceMappingURL=fetchJson.js.map