File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 88
99import { Plugin } from '../types' ;
1010
11- interface LogMetadataData {
11+ interface LogData {
1212 metadata ?: any ;
1313}
1414
15- interface LogMetadataAPI {
15+ export interface LogAPI {
1616 setMetadata ( metadata : any ) : void ;
1717}
1818
@@ -21,7 +21,7 @@ interface LogMetadataAPI {
2121 * During a move, you can set metadata using ctx.log.setMetadata and it will be
2222 * available on the log entry for that move.
2323 */
24- const LogPlugin : Plugin < LogMetadataAPI , LogMetadataData > = {
24+ const LogPlugin : Plugin < LogAPI , LogData > = {
2525 name : 'log' ,
2626
2727 flush : ( ) => ( { } ) ,
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import { INVALID_MOVE } from './core/constants';
88import { Auth } from './server/auth' ;
99import * as StorageAPI from './server/db/base' ;
1010import { EventsAPI } from './plugins/plugin-events' ;
11+ import { LogAPI } from './plugins/plugin-log' ;
1112import { RandomAPI } from './plugins/random/random' ;
1213
1314export { StorageAPI } ;
@@ -74,6 +75,7 @@ export interface Ctx {
7475 // internally there are two contexts, one is a serialized POJO and another
7576 // "enhanced" context that has plugin api methods attached
7677 events ?: EventsAPI ;
78+ log ?: LogAPI ;
7779 random ?: RandomAPI ;
7880}
7981
You can’t perform that action at this time.
0 commit comments