Skip to content

BridgeJS hangs then produces errors for DOM types #512

@MaxDesiatov

Description

@MaxDesiatov

Paste following TypeScript code into PlayBridgeJS in bridge-js.d.ts tab (or open this link https://swiftwasm.org/JavaScriptKit/PlayBridgeJS/?code=H4sIAAAAAAAAE6tWKi7PTCtRslLS11fwL0jNU0hIKspMSU%2FVzSrWS9ErKU5QKElMUtJRSikpBipKrSjILypRSCvNSy7JzM9TSE8tcU7MK0ss1qiwUiguKcrMS9e0UvAI8fWBCLvmpOam5pVYK9UCANyqcRdpAAAA&enc=gzip-b64)

export function getCanvas(x: string): HTMLCanvasElement;

this will make the page hang for long time (a minute or two), then producing an error displayed above the text input that's not actionable:

[...]
JavaScriptKit/node_modules/typescript/lib/lib.dom.d.ts:8654:4: warning: Unknown non-nominal type: IDBObjectStore | IDBIndex | IDBCursor
JavaScriptKit/node_modules/typescript/lib/lib.dom.d.ts:377:4: warning: Unknown non-nominal type: boolean | MediaTrackConstraints
JavaScriptKit/node_modules/typescript/lib/lib.dom.d.ts:8545:4: warning: Unknown non-nominal type: IDBValidKey | IDBKeyRange
BridgeJSTool/ImportTS.swift:75: Assertion failed: For now, we require a single parameter to be lowered to a single Wasm core type
[5/8] Import TypeScript API
error: Plugin ended with exit code 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions