mirror of
https://github.com/fleetdm/fleet
synced 2026-04-30 18:07:56 +00:00
25 lines
518 B
TypeScript
25 lines
518 B
TypeScript
|
|
import {
|
||
|
|
ISelectTargetsEntity,
|
||
|
|
ISelectHost,
|
||
|
|
ISelectLabel,
|
||
|
|
ISelectTeam,
|
||
|
|
} from "interfaces/target";
|
||
|
|
|
||
|
|
export const isTargetHost = (
|
||
|
|
target: ISelectTargetsEntity
|
||
|
|
): target is ISelectHost => {
|
||
|
|
return target.target_type === "hosts";
|
||
|
|
};
|
||
|
|
|
||
|
|
export const isTargetLabel = (
|
||
|
|
target: ISelectTargetsEntity
|
||
|
|
): target is ISelectLabel => {
|
||
|
|
return target.target_type === "labels";
|
||
|
|
};
|
||
|
|
|
||
|
|
export const isTargetTeam = (
|
||
|
|
target: ISelectTargetsEntity
|
||
|
|
): target is ISelectTeam => {
|
||
|
|
return target.target_type === "teams";
|
||
|
|
};
|