• Eval cade on Electron main process

    await ctx.api.rpc('return 1 + 1') // result 2 await ctx.api.rpc(return require('os').platform()) // result 'darwin' await ctx.api.rpc(return require('./constant').APP_NAME) // result 'yank-note'

    Parameters

    • code: string

      Function body

    Returns Promise<any>