fix(web): fix typing for Parser.init
Since we're usually only providing `locateFile`, we need the type to be `Partial<>` to allow it. This also matches the typing in `@types/emscripten`'s `EmscriptenModuleFactory` type signature.
This commit is contained in:
parent
02fff92b91
commit
64760ffa76
3 changed files with 3 additions and 3 deletions
|
|
@ -9,7 +9,7 @@ export let Module: MainModule | null = null;
|
|||
*
|
||||
* Initialize the Tree-sitter WASM module. This should only be called by the {@link Parser} class via {@link Parser.init}.
|
||||
*/
|
||||
export async function initializeBinding(moduleOptions?: EmscriptenModule): Promise<MainModule> {
|
||||
export async function initializeBinding(moduleOptions?: Partial<EmscriptenModule>): Promise<MainModule> {
|
||||
if (!Module) {
|
||||
Module = await createModule(moduleOptions);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue