From 14aaac672ccdce944e06b44bd87181b05eca4256 Mon Sep 17 00:00:00 2001 From: adlee-was-taken Date: Mon, 20 Apr 2026 19:36:54 -0400 Subject: [PATCH] build(ext): align wasm.d.ts with relicario-wasm surface MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add initSync named export (Chrome MV3 service worker path — can't use dynamic import()), and correct TotpCode.expires_at from number to bigint to match the u64 wasm-bindgen output. Co-Authored-By: Claude Opus 4.7 (1M context) --- extension/src/wasm.d.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/extension/src/wasm.d.ts b/extension/src/wasm.d.ts index 5b2f5cb..a6c3818 100644 --- a/extension/src/wasm.d.ts +++ b/extension/src/wasm.d.ts @@ -15,7 +15,7 @@ export class EncryptedAttachment { export class TotpCode { readonly code: string; - readonly expires_at: number; + readonly expires_at: bigint; free(): void; } @@ -56,3 +56,6 @@ export function totp_compute(config_json: string, now_unix_seconds: bigint): Tot // Initializer (wasm-bindgen's default init function). export default function init(module_or_path?: unknown): Promise; + +// wasm-bindgen's sync init — Chrome MV3 service workers can't use dynamic import(). +export function initSync(args: { module: WebAssembly.Module }): void;