Skip to content

Commit

Permalink
add return type
Browse files Browse the repository at this point in the history
  • Loading branch information
juliaElastic committed Jan 31, 2024
1 parent a86268a commit 1f6550f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x-pack/plugins/fleet/common/services/output_helpers.ts
Expand Up @@ -29,7 +29,7 @@ const sameClusterRestrictedPackages = [
* Return allowed output type for a given agent policy,
* Fleet Server and APM cannot use anything else than same cluster ES
*/
export function getAllowedOutputTypeForPolicy(agentPolicy: AgentPolicy) {
export function getAllowedOutputTypeForPolicy(agentPolicy: AgentPolicy): string[] {
const isRestrictedToSameClusterES =
agentPolicy.package_policies &&
agentPolicy.package_policies.some(
Expand All @@ -43,7 +43,7 @@ export function getAllowedOutputTypeForPolicy(agentPolicy: AgentPolicy) {
return Object.values(outputType);
}

export function getAllowedOutputTypesForIntegration(packageName: string) {
export function getAllowedOutputTypesForIntegration(packageName: string): string[] {
const isRestrictedToSameClusterES = sameClusterRestrictedPackages.includes(packageName);

if (isRestrictedToSameClusterES) {
Expand Down

0 comments on commit 1f6550f

Please sign in to comment.