KC's Workspace
    Preparing search index...

    Deserializes TypeDoc's JSON output back to Reflection instances.

    Index

    Constructors

    • Parameters

      Returns Deserializer

    Properties

    logger: Logger
    oldFileIdToNewFileId: Record<FileId, FileId | undefined>
    oldIdToNewId: Record<ReflectionId, ReflectionId | undefined>
    project: ProjectReflection | undefined
    projectRoot: NormalizedPath

    Only set when deserializing.

    reflectionBuilders: {
        declaration: (
            parent: Reflection,
            obj: ReferenceReflection | DeclarationReflection,
        ) => DeclarationReflection;
        document: (
            parent: Reflection,
            obj: DocumentReflection,
        ) => DocumentReflection;
        param: (
            parent: SignatureReflection,
            obj: ParameterReflection,
        ) => ParameterReflection;
        project: (parent: Reflection, obj: ProjectReflection) => ProjectReflection;
        reference: (
            parent: Reflection,
            obj: ReferenceReflection,
        ) => ReferenceReflection;
        signature: (
            parent: DeclarationReflection,
            obj: SignatureReflection,
        ) => SignatureReflection;
        typeParam: (
            parent: NonNullable<
                DeclarationReflection
                | SignatureReflection
                | undefined,
            >,
            obj: TypeParameterReflection,
        ) => TypeParameterReflection;
    }
    typeBuilders: {
        array: (obj: ArrayType, de: Deserializer) => ArrayType;
        conditional: (obj: ConditionalType, de: Deserializer) => ConditionalType;
        indexedAccess: (
            obj: IndexedAccessType,
            de: Deserializer,
        ) => IndexedAccessType;
        inferred: (obj: InferredType, de: Deserializer) => InferredType;
        intersection: (obj: IntersectionType, de: Deserializer) => IntersectionType;
        intrinsic: (obj: IntrinsicType, de: Deserializer) => IntrinsicType;
        literal: (obj: LiteralType, de: Deserializer) => LiteralType;
        mapped: (obj: MappedType, de: Deserializer) => MappedType;
        namedTupleMember: (
            obj: NamedTupleMemberType,
            de: Deserializer,
        ) => NamedTupleMember;
        optional: (obj: OptionalType, de: Deserializer) => OptionalType;
        predicate: (obj: PredicateType, de: Deserializer) => PredicateType;
        query: (obj: QueryType, de: Deserializer) => QueryType;
        reference: (obj: ReferenceType, de: Deserializer) => ReferenceType;
        reflection: (obj: ReflectionType, de: Deserializer) => ReflectionType;
        rest: (obj: RestType, de: Deserializer) => RestType;
        templateLiteral: (
            obj: TemplateLiteralType,
            de: Deserializer,
        ) => TemplateLiteralType;
        tuple: (obj: TupleType, de: Deserializer) => TupleType;
        typeOperator: (obj: TypeOperatorType, de: Deserializer) => TypeOperatorType;
        union: (obj: UnionType, de: Deserializer) => UnionType;
        unknown: (obj: UnknownType, de: Deserializer) => UnknownType;
    }

    Methods

    • Parameters

      Returns void

    • Type Parameters

      Parameters

      • obj: T

      Returns TypeKindMap[T["type"]]

    • Defers work until the initial pass of serialization has been completed. This can be used to set up references which cannot be immediately restored.

      May only be called when deserializing.

      Parameters

      Returns void

    • Type Parameters

      • T

      Parameters

      Returns void

    • Type Parameters

      Parameters

      • source: T
      • creator: (obj: T) => U

      Returns U

    • Type Parameters

      Parameters

      • source: T | undefined
      • creator: (obj: T) => U

      Returns U | undefined

    • Type Parameters

      Parameters

      • sourceArray: T[]
      • creator: (obj: T) => U

      Returns U[]

    • Type Parameters

      Parameters

      • sourceArray: T[] | undefined
      • creator: (obj: T) => U

      Returns U[] | undefined

    • Revive a single project into the structure it was originally created with. This is generally not appropriate for merging multiple projects since projects may contain reflections in their root, not inside a module.

      Parameters

      Returns ProjectReflection

    • Parameters

      Returns ProjectReflection

    • Type Parameters

      Parameters

      • obj: T

      Returns TypeKindMap[T["type"]]

    • Type Parameters

      Parameters

      • obj: T | undefined

      Returns TypeKindMap[T["type"]] | undefined