I am attempted to compile as stated in the readme (using typescript and svelte):
import { SiglumCompiler } from '@siglum/engine';
const compiler = new SiglumCompiler({
bundlesUrl: '/bundles',
wasmUrl: '/busytex.wasm',
workerUrl: '/worker.js', // Explicit path to copied worker
});
await compiler.init();
/* inside an async function in the same file */
const result = await compiler.compile(input);
if (result.success) {
return new Blob([result.pdf], { type: 'application/pdf' });
}
However, I receive this error:
Type 'Uint8Array | undefined' is not assignable to type 'BlobPart'.
Type 'undefined' is not assignable to type 'BlobPart'.
If I do result.pdf! to remove the possibility of undefined, I get the following error:
Type 'Uint8Array' is not assignable to type 'BlobPart'.
Type 'Uint8Array' is not assignable to type 'ArrayBufferView'.
Types of property 'buffer' are incompatible.
Type 'ArrayBufferLike' is not assignable to type 'ArrayBuffer'.
Type 'SharedArrayBuffer' is missing the following properties from type 'ArrayBuffer': resizable, resize, detached, transfer, transferToFixedLength
I am attempted to compile as stated in the readme (using typescript and svelte):
However, I receive this error:
If I do
result.pdf!to remove the possibility ofundefined, I get the following error: