/**
 * TypeSystem Handle Types and Result Types
 *
 * This module defines opaque handles for TS declarations and
 * result types for TypeSystem queries. These form the boundary
 * between the Binding layer (TS-allowed) and TypeSystem layer (TS-free).
 *
 * INVARIANT: No ts.Type, ts.Symbol, or ts.Signature types appear
 * in the TypeSystem layer. Only opaque handles cross the boundary.
 */
// ═══════════════════════════════════════════════════════════════════════════
// CONSTANTS
// ═══════════════════════════════════════════════════════════════════════════
/** Poison type for undeterminable types */
export const unknownType = { kind: "unknownType" };
/** Explicit user-authored `unknown` type */
export const explicitUnknownType = {
    kind: "unknownType",
    explicit: true,
};
/** Poison type for impossible types */
export const neverType = { kind: "neverType" };
/** Void type for functions with no return */
export const voidType = { kind: "voidType" };
/** Any type */
export const anyType = { kind: "anyType" };
// ═══════════════════════════════════════════════════════════════════════════
// HANDLE FACTORY FUNCTIONS
// ═══════════════════════════════════════════════════════════════════════════
/**
 * Create a DeclId (used by Binding module internally).
 */
export const makeDeclId = (id) => ({
    __brand: "DeclId",
    id,
});
/**
 * Create a SignatureId (used by Binding module internally).
 */
export const makeSignatureId = (id) => ({
    __brand: "SignatureId",
    id,
});
/**
 * Create a MemberId (used by Binding module internally).
 */
export const makeMemberId = (declId, name) => ({
    __brand: "MemberId",
    declId,
    name,
});
/**
 * Create a TypeSyntaxId (used by Binding module internally).
 */
export const makeTypeSyntaxId = (id) => ({
    __brand: "TypeSyntaxId",
    id,
});
// ═══════════════════════════════════════════════════════════════════════════
// RESULT FACTORY FUNCTIONS
// ═══════════════════════════════════════════════════════════════════════════
/**
 * Create a successful TypeResult with no diagnostics.
 */
export const typeOk = (type) => ({
    type,
    diagnostics: [],
});
/**
 * Create a TypeResult with unknownType and diagnostics.
 */
export const typeError = (diagnostics) => ({
    type: unknownType,
    diagnostics,
});
/**
 * Create a SignatureResult.
 */
export const signatureOk = (parameters, returnType, typeParameters) => ({
    parameters,
    returnType,
    typeParameters,
    diagnostics: [],
});
//# sourceMappingURL=types.js.map