iwf
    Preparing search index...

    Class WikibaseSenseSnak

    Class for the WikibaseSenseSnak.

    Most used property of this type...

    Hierarchy (View Summary)

    • Snak
      • WikibaseSenseSnak
    Index

    Constructors

    Properties

    datatype: string = 'wikibase-sense'
    hash: string | undefined
    property: `P${number}`
    snaktype: SnakType

    Accessors

    • get hasValue(): boolean

      Checks if the snak has a value.

      Returns boolean

      True if the snak has a value.

    • get id(): string | undefined

      The lexeme ID will take the form L{number}-S{number}.

      Returns string | undefined

      The value of the snak.

      id

    • set id(value: string | undefined): void

      Parameters

      • value: string | undefined

        The value of the snak.

      Returns void

      id

    • get internalID(): string

      Creates a unique ID for the Snak.

      Returns string

      The ID.

    Methods

    • Create a new instance of the class from some basic data.

      Parameters

      • property: `P${number}`

        The property of the snak.

      • id: string

        The lexeme ID.

      Returns WikibaseSenseSnak

      A new instance of the class.

      const snak = WikibaseSenseSnak.fromData('P123', 123, 456);