js:compat es5,use context.sendNative to replace Proxy
This commit is contained in:
@@ -16,7 +16,31 @@
|
||||
export * from 'reflect-metadata'
|
||||
|
||||
export type BridgeContext = {
|
||||
[index: string]: { [index: string]: (args?: any) => Promise<any> }
|
||||
/**
|
||||
* The identify of current context
|
||||
*/
|
||||
id: string
|
||||
/**
|
||||
* In this case,It's current panel
|
||||
*/
|
||||
entity: any
|
||||
/**
|
||||
* call native plugin
|
||||
* @param namespace
|
||||
* @param method
|
||||
* @param args
|
||||
*/
|
||||
callNative(namespace: string, method: string, args?: any): Promise<any>
|
||||
/**
|
||||
* Transform function to functionId as string
|
||||
* @param func
|
||||
*/
|
||||
function2Id(func: Function): string
|
||||
/**
|
||||
* Remove transformed functions
|
||||
* @param funcId
|
||||
*/
|
||||
removeFuncById(funcId: string): void
|
||||
}
|
||||
|
||||
declare global {
|
||||
|
Reference in New Issue
Block a user