/**
 * Cloudflare traits - re-exports shared traits and adds Cloudflare-specific ones.
 */
export * from "@distilled.cloud/core/traits";
import { makeAnnotation, getAnnotation } from "@distilled.cloud/core/traits";
import * as AST from "effect/SchemaAST";
// =============================================================================
// Cloudflare-specific Traits
// =============================================================================
/** Symbol for error matchers (code + message pattern matching) */
export const errorMatchersSymbol = Symbol.for("@distilled.cloud/cf/error-matchers");
/**
 * Apply error matchers directly to a class's AST annotations.
 * Used for TaggedErrorClass where .pipe() on a class returns a schema
 * (not a class), breaking `extends ... .pipe(...)`.
 */
export const applyErrorMatchers = (cls, matchers) => {
    const annotations = cls.ast.annotations;
    annotations[errorMatchersSymbol] = matchers;
};
export const getErrorMatchers = (ast) => getAnnotation(ast, errorMatchersSymbol);
/** Symbol for content type override (e.g., multipart) */
export const contentTypeSymbol = Symbol.for("@distilled.cloud/cf/content-type");
export const ContentType = (type) => makeAnnotation(contentTypeSymbol, type);
export const getContentType = (ast) => getAnnotation(ast, contentTypeSymbol);
//# sourceMappingURL=traits.js.map