export class StubTokenUsageGateway {
    records = [];
    storedRecords = [];
    recordsByPath = new Map();
    async record(record) {
        this.records.push(record);
        this.storedRecords.push(record);
    }
    async loadAll(localPath) {
        const perPath = this.recordsByPath.get(localPath);
        if (perPath) {
            return [...perPath];
        }
        return [...this.storedRecords];
    }
    setRecords(records) {
        this.storedRecords = [...records];
    }
    setRecordsForPath(localPath, records) {
        this.recordsByPath.set(localPath, [...records]);
    }
    clear() {
        this.records = [];
        this.storedRecords = [];
        this.recordsByPath.clear();
    }
}
//# sourceMappingURL=tokenUsage.stub.js.map