@isograph/react 0.0.0-main-e6123cb6 → 0.0.0-main-996e78c7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cache.js CHANGED
@@ -178,8 +178,9 @@ function callSubscriptions(environment, recordsEncounteredWhenNormalizing) {
178
178
  return subscription.callback();
179
179
  }
180
180
  default: {
181
- // @ts-expect-error(6133)
181
+ // Ensure we have covered all variants
182
182
  const _ = subscription;
183
+ _;
183
184
  throw new Error('Unexpected case');
184
185
  }
185
186
  }
@@ -219,8 +220,9 @@ function normalizeDataIntoRecord(environment, normalizationAst, networkResponseP
219
220
  break;
220
221
  }
221
222
  default: {
222
- // @ts-expect-error(6133)
223
+ // Ensure we have covered all variants
223
224
  let _ = normalizationNode;
225
+ _;
224
226
  throw new Error('Unexpected normalization node kind');
225
227
  }
226
228
  }
@@ -363,8 +365,9 @@ function getStoreKeyChunkForArgumentValue(argumentValue, variables) {
363
365
  }
364
366
  default: {
365
367
  // TODO configure eslint to allow unused vars starting with _
366
- // @ts-expect-error
368
+ // Ensure we have covered all variants
367
369
  const _ = argumentValue;
370
+ _;
368
371
  throw new Error('Unexpected case');
369
372
  }
370
373
  }
@@ -390,8 +393,9 @@ function getNetworkResponseKey(astNode) {
390
393
  break;
391
394
  }
392
395
  default: {
393
- // @ts-expect-error
396
+ // Ensure we have covered all variants
394
397
  let _ = argumentValue;
398
+ _;
395
399
  throw new Error('Unexpected case');
396
400
  }
397
401
  }
package/dist/read.js CHANGED
@@ -208,6 +208,12 @@ function readData(environment, ast, root, variables, nestedRefetchQueries, mutab
208
208
  }
209
209
  break;
210
210
  }
211
+ default: {
212
+ // Ensure we have covered all variants
213
+ let _ = field;
214
+ _;
215
+ throw new Error('Unexpected case.');
216
+ }
211
217
  }
212
218
  }
213
219
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@isograph/react",
3
- "version": "0.0.0-main-e6123cb6",
3
+ "version": "0.0.0-main-996e78c7",
4
4
  "description": "Use Isograph with React",
5
5
  "homepage": "https://isograph.dev",
6
6
  "main": "dist/index.js",
@@ -16,8 +16,8 @@
16
16
  "prepack": "yarn run test && yarn run compile"
17
17
  },
18
18
  "dependencies": {
19
- "@isograph/disposable-types": "0.0.0-main-e6123cb6",
20
- "@isograph/react-disposable-state": "0.0.0-main-e6123cb6",
19
+ "@isograph/disposable-types": "0.0.0-main-996e78c7",
20
+ "@isograph/react-disposable-state": "0.0.0-main-996e78c7",
21
21
  "react": "^18.2.0"
22
22
  },
23
23
  "devDependencies": {
package/src/cache.ts CHANGED
@@ -319,8 +319,9 @@ function callSubscriptions(
319
319
  return subscription.callback();
320
320
  }
321
321
  default: {
322
- // @ts-expect-error(6133)
322
+ // Ensure we have covered all variants
323
323
  const _: never = subscription;
324
+ _;
324
325
  throw new Error('Unexpected case');
325
326
  }
326
327
  }
@@ -394,8 +395,9 @@ function normalizeDataIntoRecord(
394
395
  break;
395
396
  }
396
397
  default: {
397
- // @ts-expect-error(6133)
398
+ // Ensure we have covered all variants
398
399
  let _: never = normalizationNode;
400
+ _;
399
401
  throw new Error('Unexpected normalization node kind');
400
402
  }
401
403
  }
@@ -650,8 +652,9 @@ function getStoreKeyChunkForArgumentValue(
650
652
  }
651
653
  default: {
652
654
  // TODO configure eslint to allow unused vars starting with _
653
- // @ts-expect-error
655
+ // Ensure we have covered all variants
654
656
  const _: never = argumentValue;
657
+ _;
655
658
  throw new Error('Unexpected case');
656
659
  }
657
660
  }
@@ -681,8 +684,9 @@ function getNetworkResponseKey(
681
684
  break;
682
685
  }
683
686
  default: {
684
- // @ts-expect-error
687
+ // Ensure we have covered all variants
685
688
  let _: never = argumentValue;
689
+ _;
686
690
  throw new Error('Unexpected case');
687
691
  }
688
692
  }
package/src/read.ts CHANGED
@@ -305,6 +305,12 @@ function readData<TReadFromStore>(
305
305
  }
306
306
  break;
307
307
  }
308
+ default: {
309
+ // Ensure we have covered all variants
310
+ let _: never = field;
311
+ _;
312
+ throw new Error('Unexpected case.');
313
+ }
308
314
  }
309
315
  }
310
316
  return {