rudeshark.net/packages/backend/src/services/chart/charts/test-intersection.ts

33 lines
653 B
TypeScript
Raw Normal View History

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],
});
}
}