From ec18991a1a59315832c505cbcf9531466f083124 Mon Sep 17 00:00:00 2001 From: Youngsoo Choi Date: Thu, 15 Apr 2021 22:59:03 -0700 Subject: [PATCH] [hotfix] Ignore type checking for edge The edge library is applied to chromium-efl but the image including it isn't ready yet. Note that once the image is created, this will be reverted. Change-Id: I294890829c120993655f94d75b0cac45cc501cc7 Signed-off-by: Youngsoo Choi --- wrt_app/service/device_api_router.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/wrt_app/service/device_api_router.ts b/wrt_app/service/device_api_router.ts index 0c885f6..e376bb5 100644 --- a/wrt_app/service/device_api_router.ts +++ b/wrt_app/service/device_api_router.ts @@ -104,23 +104,23 @@ export class DeviceAPIRouter { } initEdgeWebapis() { - if (wrt['edge'] && !global.webapis.edge) { - let edge = wrt.edge as NativeWRTjs.EdgeExtension; + if ((wrt as any)['edge'] && !global.webapis.edge) { + let edge = (wrt as any).edge as any; global.webapis.edge = { orchestrationGetDevicelist: (service_name: string, exec_type: string) => { - return edge.orchestrationGetDevicelist(service_name, exec_type); + return edge?.orchestrationGetDevicelist(service_name, exec_type); }, orchestrationReadCapability: (ip: string) => { - return edge.orchestrationReadCapability(ip); + return edge?.orchestrationReadCapability(ip); }, orchestrationRequestService: (app_name: string, self_select: boolean, exec_type: string, exec_parameter: string) => { - return edge.orchestrationRequestService(app_name, self_select, exec_type, exec_parameter); + return edge?.orchestrationRequestService(app_name, self_select, exec_type, exec_parameter); }, orchestrationRequestServiceOnDevice: (app_name: string, self_select: boolean, exec_type: string, exec_parameter: string, ip: string) => { - return edge.orchestrationRequestServiceOnDevice(app_name, self_select, exec_type, exec_parameter, ip); + return edge?.orchestrationRequestServiceOnDevice(app_name, self_select, exec_type, exec_parameter, ip); }, orchestrationWriteCapability: (json: string) => { - return edge.orchestrationWriteCapability(json); + return edge?.orchestrationWriteCapability(json); }, } Object.defineProperty(global.webapis, 'edge', { writable: false, enumerable: true }); -- 2.7.4