chore: fix ContentType usage (#2353)

* chore: fix ContentType usage

* chore: fix specs
This commit is contained in:
Karol Sójko
2023-07-12 13:53:29 +02:00
committed by GitHub
parent d057cdff84
commit 325737bfbd
247 changed files with 1092 additions and 1060 deletions

View File

@@ -1,17 +1,13 @@
import { DecryptedItemInterface, ItemContent, Predicate, PredicateInterface } from '@standardnotes/models'
import { ContentType } from '@standardnotes/common'
export interface SingletonManagerInterface {
findSingleton<T extends DecryptedItemInterface>(
contentType: ContentType,
predicate: PredicateInterface<T>,
): T | undefined
findSingleton<T extends DecryptedItemInterface>(contentType: string, predicate: PredicateInterface<T>): T | undefined
findOrCreateContentTypeSingleton<
C extends ItemContent = ItemContent,
T extends DecryptedItemInterface<C> = DecryptedItemInterface<C>,
>(
contentType: ContentType,
contentType: string,
createContent: ItemContent,
): Promise<T>
@@ -20,7 +16,7 @@ export interface SingletonManagerInterface {
T extends DecryptedItemInterface<C> = DecryptedItemInterface<C>,
>(
predicate: Predicate<T>,
contentType: ContentType,
contentType: string,
createContent: ItemContent,
): Promise<T>
}