Fix type error for BitbucketRepositoryParser

Signed-off-by: AaronvDiepen <aaronvdiepen@gmail.com>
This commit is contained in:
AaronvDiepen
2022-03-17 17:07:45 +01:00
parent c47509e1a0
commit 4521e67fe5
@@ -34,16 +34,17 @@ export type BitbucketRepositoryParser = (options: {
logger: Logger;
}) => AsyncIterable<CatalogProcessorResult>;
export function* defaultRepositoryParser(options: {
target: string;
presence?: 'optional' | 'required';
}) {
yield processingResult.location({
type: 'url',
target: options.target,
// Not all locations may actually exist, since the user defined them as a wildcard pattern.
// Thus, we emit them as optional and let the downstream processor find them while not outputting
// an error if it couldn't.
presence: options.presence ?? 'optional',
});
}
export const defaultRepositoryParser =
async function* defaultRepositoryParser(options: {
target: string;
presence?: 'optional' | 'required';
}) {
yield processingResult.location({
type: 'url',
target: options.target,
// Not all locations may actually exist, since the user defined them as a wildcard pattern.
// Thus, we emit them as optional and let the downstream processor find them while not outputting
// an error if it couldn't.
presence: options.presence ?? 'optional',
});
};