mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-05 19:20:12 +08:00
11 lines
287 B
TypeScript
11 lines
287 B
TypeScript
import { ICommand } from '../schema'
|
|
import { Matcher } from './Matcher.js'
|
|
|
|
export class OrMatcher implements Matcher {
|
|
constructor(private conditions: Matcher[]) {}
|
|
|
|
match(command: ICommand): boolean {
|
|
return this.conditions.some((condition) => condition.match(command))
|
|
}
|
|
}
|