Documentation
    Preparing search index...

    Function getDocumentElementTypeByIdStrict

    • Retrieves an element from the document and returns it if it is non-null and has the expected type. Otherwise an error is thrown.

      Type Parameters

      Parameters

      • document: Document

        The document from which to look up the element.

      • id: string

        The ID of the element.

      • Type: ConstructorOf<T>

        The type you expect the element to have.

      Returns T

      The requested element, if it has the expected type.

      InvalidOperationError When the document element has an unexpected type.

      UnexpectedNilError When the the document element is null.