aboutsummaryrefslogblamecommitdiff
path: root/src/content/repositories/FollowKeyRepository.ts
blob: 07ceec76bff48dc9d83ed13244dd4c4468061763 (plain) (tree)
1
2
3
4
5
6
7
8






                                              























                                                                     
export default interface FollowKeyRepository {
  getKeys(): string[];

  pushKey(key: string): void;

  popKey(): void;

  clearKeys(): void;
}

const current: {
  keys: string[];
} = {
  keys: [],
};

export class FollowKeyRepositoryImpl implements FollowKeyRepository {
  getKeys(): string[] {
    return current.keys;
  }

  pushKey(key: string): void {
    current.keys.push(key);
  }

  popKey(): void {
    current.keys.pop();
  }

  clearKeys(): void {
    current.keys = [];
  }
}