feat: establish TypeScript-aware frontend tooling
This commit is contained in:
@@ -21,11 +21,15 @@ describe("color scheme policy", () => {
|
||||
});
|
||||
|
||||
it("applies a persisted preference before application paint", () => {
|
||||
const storage = {
|
||||
read: () => ({ ok: true, value: "system" }),
|
||||
write: () => ({ ok: true }),
|
||||
remove: () => ({ ok: true }),
|
||||
};
|
||||
const storage =
|
||||
/** @type {import("../../src/application/ports/storage-port.js").StoragePort} */ ({
|
||||
read: () => ({
|
||||
ok: /** @type {const} */ (true),
|
||||
value: "system",
|
||||
}),
|
||||
write: () => ({ ok: /** @type {const} */ (true) }),
|
||||
remove: () => ({ ok: /** @type {const} */ (true) }),
|
||||
});
|
||||
|
||||
const result = initializeColorScheme(storage, {
|
||||
documentElement: document.documentElement,
|
||||
|
||||
Reference in New Issue
Block a user