Skip to content

Commit

Permalink
chore: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ArcherGu committed Aug 23, 2022
1 parent 1b07d60 commit ddce9ea
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Provide at least one controller to start the application, `app.controller.ts`:
```ts
import type { BrowserWindow } from 'electron'
import { app } from 'electron'
import { Controller, Inject, IpcInvoke, IpcOn, Window } from 'einf'
import { Controller, Inject, IpcHandle, IpcSend, Window } from 'einf'
import type { AppService } from './app.service'

@Controller()
Expand All @@ -77,18 +77,18 @@ export class AppController {
@Window() private win: BrowserWindow,
) {}

@IpcOn('reply-msg')
@IpcSend('reply-msg')
public replyMsg(msg: string) {
return msg
}

@IpcInvoke('send-msg')
@IpcHandle('send-msg')
public sendMsg(msg: string) {
console.log(msg)
return 'Get msg'
}

@IpcInvoke('exit')
@IpcHandle('exit')
public exit() {
app.quit()
}
Expand Down

0 comments on commit ddce9ea

Please sign in to comment.