1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2025-01-14 14:43:17 +08:00
pigallery2/src/common/entities/AutoCompleteItem.ts

17 lines
393 B
TypeScript
Raw Normal View History

import {SearchQueryTypes} from './SearchQueryDTO';
2016-05-04 17:20:21 +02:00
export interface IAutoCompleteItem {
text: string;
type?: SearchQueryTypes;
}
export class AutoCompleteItem implements IAutoCompleteItem {
2021-03-20 14:37:56 +01:00
constructor(public text: string, public type: SearchQueryTypes = null) {
}
equals(other: AutoCompleteItem): boolean {
return this.text === other.text && this.type === other.type;
}
2016-05-04 17:20:21 +02:00
}