Represents a question being asked. Question objects are an extension of
IntransitiveActivity. That is, the Question object is an Activity,
but the direct object is the question itself and therefore it would not
contain an object
property.
Either of the inclusiveOptions
and exclusiveOptions
properties may be
used to express possible answers, but a Question object must not have both
properties.
Question(values: { id?: URL | null; attachments?: ()[]; attribution?: ; attributions?: ()[]; audience?: ; audiences?: (Object | URL)[]; content?: ; contents?: ((string | LanguageString))[]; contexts?: ()[]; name?: ; names?: ((string | LanguageString))[]; endTime?: Temporal.Instant | null; generators?: ()[]; icon?: ; icons?: (Image | URL)[]; image?: ; images?: (Image | URL)[]; replyTarget?: ; replyTargets?: ()[]; location?: ; locations?: ()[]; preview?: ; previews?: ()[]; published?: Temporal.Instant | null; replies?: ; startTime?: Temporal.Instant | null; summary?: ; summaries?: ((string | LanguageString))[]; tags?: ()[]; updated?: Temporal.Instant | null; url?: ; urls?: ((URL | Link))[]; to?: ; tos?: (Object | URL)[]; bto?: ; btos?: (Object | URL)[]; cc?: ; ccs?: (Object | URL)[]; bcc?: ; bccs?: (Object | URL)[]; mediaType?: string | null; duration?: Temporal.Duration | null; sensitive?: boolean | null; source?: Source | null; proof?: ; proofs?: (DataIntegrityProof | URL)[]; actor?: ; actors?: ()[]; object?: ; objects?: (Object | URL)[]; target?: ; targets?: (Object | URL)[]; result?: ; results?: (Object | URL)[]; origin?: ; origins?: (Object | URL)[]; instrument?: ; instruments?: (Object | URL)[]; exclusiveOptions?: (Object | URL)[]; inclusiveOptions?: (Object | URL)[]; closed?: ; voters?: number | null; quoteUrl?: URL | null; },unnamed 1?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; },)
Constructs a new instance of Question with the given values.
closed:
Indicates that a question has been closed, and answers are no longer accepted.
exclusiveOptionIds: URL[]
Similar to
Question.getExclusiveOptions,
but returns their @id
s instead of the objects themselves.
inclusiveOptionIds: URL[]
Similar to
Question.getInclusiveOptions,
but returns their @id
s instead of the objects themselves.
The URI of the ActivityStreams object that this object quotes.
This property sets three JSON-LD properties at once under the hood:
- https://www.w3.org/ns/activitystreams#quoteUrl
- https://misskey-hub.net/ns#_misskey_quote
- http://fedibird.com/ns#quoteUri
When a JSON-LD object is parsed, this property is filled with one of the values of those three properties in order.
[Symbol.for("Deno.customInspect")](inspect: Deno.inspect,options: Deno.InspectOptions,): string
_getCustomInspectProxy(): Record<string, unknown>
clone(values?: { id?: URL | null; attachments?: ()[]; attribution?: ; attributions?: ()[]; audience?: ; audiences?: (Object | URL)[]; content?: ; contents?: ((string | LanguageString))[]; contexts?: ()[]; name?: ; names?: ((string | LanguageString))[]; endTime?: Temporal.Instant | null; generators?: ()[]; icon?: ; icons?: (Image | URL)[]; image?: ; images?: (Image | URL)[]; replyTarget?: ; replyTargets?: ()[]; location?: ; locations?: ()[]; preview?: ; previews?: ()[]; published?: Temporal.Instant | null; replies?: ; startTime?: Temporal.Instant | null; summary?: ; summaries?: ((string | LanguageString))[]; tags?: ()[]; updated?: Temporal.Instant | null; url?: ; urls?: ((URL | Link))[]; to?: ; tos?: (Object | URL)[]; bto?: ; btos?: (Object | URL)[]; cc?: ; ccs?: (Object | URL)[]; bcc?: ; bccs?: (Object | URL)[]; mediaType?: string | null; duration?: Temporal.Duration | null; sensitive?: boolean | null; source?: Source | null; proof?: ; proofs?: (DataIntegrityProof | URL)[]; actor?: ; actors?: ()[]; object?: ; objects?: (Object | URL)[]; target?: ; targets?: (Object | URL)[]; result?: ; results?: (Object | URL)[]; origin?: ; origins?: (Object | URL)[]; instrument?: ; instruments?: (Object | URL)[]; exclusiveOptions?: (Object | URL)[]; inclusiveOptions?: (Object | URL)[]; closed?: ; voters?: number | null; quoteUrl?: URL | null; },options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; },): Question
Clones this instance, optionally updating it with the given values.
getExclusiveOptions(options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; suppressError?: boolean; }): AsyncIterable<Object>
Identifies an exclusive option for a Question. Use of exclusiveOptions
implies that the Question can have only a single answer. To indicate that
a Question can have multiple answers, use inclusiveOptions
.
getInclusiveOptions(options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; suppressError?: boolean; }): AsyncIterable<Object>
Identifies an inclusive option for a Question. Use of inclusiveOptions
implies that the Question can have multiple answers. To indicate that
a Question can have only one answer, use exclusiveOptions
.
isCompactable(): boolean
fromJsonLd(json: unknown,options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; },): Promise<Question>
Converts a JSON-LD structure to an object of this type.