UNPKG

@dolittle/sdk.artifacts

Version:

Dolittle is a decentralized, distributed, event-driven microservice platform built to harness the power of events.

11 lines 876 B
import { Constructor } from '@dolittle/types'; import { Artifact, ArtifactIdLike } from './Artifact'; /** * Creates a type predicate for the provided {@link Artifact} type. * @param {Constructor} type - The type of the artifact. * @param {(any) => boolean} idTypePredicate - A predicate to use to check the type of the artifact id. * @param {(any) => boolean} [extraPredicate] - An optional predicate to use to perform additional checks on the object. * @returns {(any) => boolean} A type predicate that checks if an object is an instance of the {@link Artifact} type. */ export declare const createIsArtifact: <A extends Artifact<T>, T extends ArtifactIdLike>(type: Constructor<A>, idTypePredicate: (object: any) => object is A["id"], extraPredicate?: ((object: A) => boolean) | undefined) => (object: any) => object is A; //# sourceMappingURL=createIsArtifact.d.ts.map