(change: TuneChange)
| 16 | | { kind: 'learning'; enabled: boolean }; |
| 17 | |
| 18 | export const changeKey = (change: TuneChange): string => { |
| 19 | switch (change.kind) { |
| 20 | case 'topic': |
| 21 | return `topic:${change.keyword}`; |
| 22 | case 'source': |
| 23 | return `source:${change.sourceId}`; |
| 24 | case 'author': |
| 25 | return `author:${change.userId}`; |
| 26 | default: |
| 27 | return 'learning'; |
| 28 | } |
| 29 | }; |
| 30 | |
| 31 | // The latest change to each control, in the order they were first made. |
| 32 | export const latestChanges = (changes: TuneChange[]): TuneChange[] => [ |
no outgoing calls
no test coverage detected