fix: coverage

This commit is contained in:
imccyu
2026-08-09 18:56:29 +08:00
parent 1b1e170c1f
commit 924cfcef95
12 changed files with 46 additions and 28 deletions

View File

@@ -34,13 +34,16 @@ afterEach(cleanup)
class TestTurnDataStore implements ConversationLocationDataStore<ConversationTurnDataMap> {
private readonly values = new Map<string, unknown>()
get<Key extends keyof ConversationTurnDataMap & string>(
get<Key extends Extract<keyof ConversationTurnDataMap, string>>(
key: Key,
): Readonly<ConversationTurnDataMap[Key]> | undefined {
return this.values.get(key) as Readonly<ConversationTurnDataMap[Key]> | undefined
}
set<Key extends keyof ConversationTurnDataMap & string>(key: Key, value: ConversationTurnDataMap[Key]): void {
set<Key extends Extract<keyof ConversationTurnDataMap, string>>(
key: Key,
value: ConversationTurnDataMap[Key],
): void {
this.values.set(key, value)
}
}