import autobind from 'autobind-decorator'; import Chart, { DeepPartial } from '../../core'; import { SchemaType } from '../../../../misc/schema'; import { name, schema } from '../schemas/test-unique'; type TestUniqueLog = SchemaType; export default class TestUniqueChart extends Chart { constructor() { super(name, schema); } @autobind protected genNewLog(latest: TestUniqueLog): DeepPartial { return {}; } @autobind protected async fetchActual(): Promise> { return {}; } @autobind public async uniqueIncrement(key: string) { await this.incIfUnique({ foo: 1 }, 'foos', key); } }