Make type(s) readonly properties of Collator/Decorator classes

Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
This commit is contained in:
Eric Peterson
2021-06-01 11:15:52 +02:00
parent b9b26ec572
commit 455b97b127
6 changed files with 35 additions and 42 deletions
+3 -4
View File
@@ -58,6 +58,7 @@ export interface IndexableDocument {
* search.
*/
export interface DocumentCollator {
readonly type: string;
execute(): Promise<IndexableDocument[]>;
}
@@ -66,8 +67,6 @@ export interface DocumentCollator {
* additional metadata.
*/
export interface DocumentDecorator {
execute(
type: string,
documents: IndexableDocument[],
): Promise<IndexableDocument[]>;
readonly types?: string[];
execute(documents: IndexableDocument[]): Promise<IndexableDocument[]>;
}