1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-24 01:04:16 +02:00

feat: introduce intersection calculation of charts

This commit is contained in:
syuilo
2022-02-09 03:46:58 +09:00
parent eb894c330f
commit 7fcd9435f3
15 changed files with 188 additions and 18 deletions

View File

@@ -0,0 +1,32 @@
import autobind from 'autobind-decorator';
import Chart, { KVs } from '../core';
import { name, schema } from './entities/test-intersection';
/**
* For testing
*/
// eslint-disable-next-line import/no-default-export
export default class TestIntersectionChart extends Chart<typeof schema> {
constructor() {
super(name, schema);
}
@autobind
protected async queryCurrentState(): Promise<Partial<KVs<typeof schema>>> {
return {};
}
@autobind
public async addA(key: string): Promise<void> {
await this.commit({
a: [key],
});
}
@autobind
public async addB(key: string): Promise<void> {
await this.commit({
b: [key],
});
}
}