chore: les dix injections de useShape passent par le faux partage

Dix sites, pas les deux que le suivi annoncait : `(() => {}) as unknown as
UseShapeLike` survivait la ou le type etait encore `any` et ou le cast ne
disait donc rien. Ils prennent le faux partage, sans cast.
This commit is contained in:
Sylvain Duchesne
2026-09-24 19:00:25 +02:00
parent c5de1cea35
commit d4b392a119
6 changed files with 16 additions and 10 deletions
@@ -38,6 +38,7 @@
*/
import { test, expect, describe, afterAll, beforeEach } from "bun:test";
import { makeUseShapeHook } from "./use-shape-fake";
import { configure, useShapeQuery, storeRegistry } from "../src/index";
import type { ShapeObservable, ShapeQuery } from "../src/surface/use-shape-query";
import { configureStoreRegistry } from "../src/shared-wallet/bootstrap";
@@ -91,7 +92,7 @@ function bootPage(quads: Quad[]): FakeOrm {
const orm = makeOrm({ source: asOrmQuads });
configure({
ng: wallet as unknown as NgLike,
useShape: (() => {}) as unknown as UseShapeLike,
useShape: makeUseShapeHook().hook,
ormSubscription: orm.query,
});
configureStoreRegistry({ getSession: async () => SESSION, normalizeId: (id) => id.trim() });
@@ -275,7 +276,7 @@ describe("useShapeQuery tells 'there is nothing' from 'I could not find out'", (
});
configure({
ng: wallet as unknown as NgLike,
useShape: (() => {}) as unknown as UseShapeLike,
useShape: makeUseShapeHook().hook,
ormSubscription: orm.query,
});
configureStoreRegistry({ getSession: async () => SESSION, normalizeId: (id) => id.trim() });