1 of 10 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.
type SerializeContext = {
/** Crosswalks, so that a control is written under another framework's identifier. */
readonly crosswalks?: readonly Crosswalk[];
/** The predicate type of a statement, where the format has one. */
readonly predicateType?: string;
readonly options?: Readonly<Record<string, Json>>;
};
What a serializer may be given besides the assessment.
type SerializeProblem = { readonly kind: "unsupported" | "invalid"; readonly message: string };
Why an assessment could not be written.
logical.Serializertypeno test imports ittype Serializer = {
readonly id: string;
/** The name of the format. */
readonly format: string;
/** The version of the format it writes. */
readonly version: string;
readonly media: string;
serialize(assessment: Assessment, context: SerializeContext): Promise<Result<string, SerializeProblem>>;
};
A serializer: deterministic (the same assessment gives the same bytes) and never reading the clock.
logical.Serializerstypeno test imports ittype Serializers = Registry<Serializer>;
A registry of serializers.
logical.createSerializersfunctionno test imports itfunction createSerializers(): Serializers
A registry of serializers, empty.
SerializeContexttypeno test imports ittype SerializeContext = {
/** Crosswalks, so that a control is written under another framework's identifier. */
readonly crosswalks?: readonly Crosswalk[];
/** The predicate type of a statement, where the format has one. */
readonly predicateType?: string;
readonly options?: Readonly<Record<string, Json>>;
};
What a serializer may be given besides the assessment.
SerializeProblemtypeno test imports ittype SerializeProblem = { readonly kind: "unsupported" | "invalid"; readonly message: string };
Why an assessment could not be written.
Serializertypeno test imports ittype Serializer = {
readonly id: string;
/** The name of the format. */
readonly format: string;
/** The version of the format it writes. */
readonly version: string;
readonly media: string;
serialize(assessment: Assessment, context: SerializeContext): Promise<Result<string, SerializeProblem>>;
};
A serializer: deterministic (the same assessment gives the same bytes) and never reading the clock.
Serializerstypeno test imports ittype Serializers = Registry<Serializer>;
A registry of serializers.
function createSerializers(): Serializers
A registry of serializers, empty.
Imported by 13 tests of the run (12 passed, 0 failed): the library's results