fix: getWithRenderProcess with optional params
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@openim/electron-client-sdk",
|
||||
"version": "1.0.1",
|
||||
"version": "1.0.2",
|
||||
"description": "open im sdk for node",
|
||||
"source": "src/index.ts",
|
||||
"main": "lib/index.js",
|
||||
|
||||
@@ -106,10 +106,9 @@ async function createWasmSDK(wasmConfig?: WasmPathConfig): Promise<void> {
|
||||
}
|
||||
}
|
||||
|
||||
export function getWithRenderProcess({
|
||||
wasmConfig,
|
||||
invoke,
|
||||
}: CreateElectronOptions) {
|
||||
export function getWithRenderProcess(
|
||||
{ wasmConfig, invoke } = {} as CreateElectronOptions
|
||||
) {
|
||||
const interalInvoke = invoke ?? window.openIMRenderApi?.imMethodsInvoke;
|
||||
const subscribeCallback = (event: keyof EmitterEvents, data: any) =>
|
||||
sdkEmitter.emit(event, data);
|
||||
|
||||
Reference in New Issue
Block a user