iwf
    Preparing search index...

    Class Statement

    Index

    Constructors

    • Parameters

      • statement: Statement

        The statement in a JSON format

      Returns Statement

      const statement = new Statement(json);
      

    Properties

    id: undefined | string
    mainsnak: Snaks
    qualifiers: Snak[]
    qualifiersOrder: string[]
    rank: "normal" | "preferred" | "deprecated"
    references: Reference[]
    type: "statement"

    Accessors

    • get internalID(): string

      Gets the unique hash of the statement.

      Returns string

      The ID

    • get property(): undefined | `P${number}`

      Gets the property of the statement.

      Returns undefined | `P${number}`

      The property of the statement

      const property = statement.property;
      

    Methods

    • Compares this statement with another statement.

      Parameters

      Returns boolean

      True if the two statements are equal

      if (statement1.equals(statement2)) {
      // do something
      }
    • Returns Statement

      The statement in a JSON format

      const json = statement.toJSON();
      
    • Creates a statement from a snak.

      Parameters

      • snak: Snak

        The snak for the statement

      Returns Statement

      The statement

      const statement = Statement.fromSnak(snak);