Files
misskey/packages/backend/src/services/chart/charts/test-unique.ts
syuilo d071d18dd7 refactor: Use ESM (#8358)
* wip

* wip

* fix

* clean up

* Update tsconfig.json

* Update activitypub.ts

* wip
2022-02-27 11:07:39 +09:00

27 lines
568 B
TypeScript

import Chart, { KVs } from '../core.js';
import { name, schema } from './entities/test-unique.js';
/**
* For testing
*/
// eslint-disable-next-line import/no-default-export
export default class TestUniqueChart extends Chart<typeof schema> {
constructor() {
super(name, schema);
}
protected async tickMajor(): Promise<Partial<KVs<typeof schema>>> {
return {};
}
protected async tickMinor(): Promise<Partial<KVs<typeof schema>>> {
return {};
}
public async uniqueIncrement(key: string): Promise<void> {
await this.commit({
foo: [key],
});
}
}