Skip to content

Commit

Permalink
fut: adjust ctx typing
Browse files Browse the repository at this point in the history
  • Loading branch information
fulcanelly committed Oct 9, 2024
1 parent 8b96242 commit 618716b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,15 @@ declare module 'chat-toolkit' {
}
```

### Adjusting escape ctx
```ts
declare module 'chat-toolkit' {
interface EscapeData {
user: User
}
}
```


## TODO
- [ ] Notifications
Expand Down
2 changes: 1 addition & 1 deletion exmaple/src/state-mng.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { prisma } from '.';
import { User } from "@prisma/client";
import { Context } from "chat-toolkit";
import { RecordedEvent, TransactionT } from '../../src/state/state';
import { RecordedEvent, TransactionT } from 'chat-toolkit/src/state/state';



Expand Down
2 changes: 1 addition & 1 deletion src/state/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export interface GlobalSharedAppContext {
}


export type EscapeData = {
export interface EscapeData {
// user: TelegramUserInstance
// character?: MoscalCharacterInstance | undefined,
sharedCtx: GlobalSharedAppContext
Expand Down

0 comments on commit 618716b

Please sign in to comment.