kopia lustrzana https://github.com/activitypub-js/activitypub-models
23 wiersze
814 B
TypeScript
23 wiersze
814 B
TypeScript
import {ASBase} from "../asBase/ASBase.model";
|
|
import {ASModelType} from "../../common/common.types";
|
|
import {QuestionFields} from "./Question.types";
|
|
|
|
/**
|
|
* 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 anyOf and oneOf properties MAY be used to express possible
|
|
* answers, but a Question object MUST NOT have both properties.
|
|
*
|
|
* {@link https://www.w3.org/ns/activitystreams#Question Docs}
|
|
*/
|
|
export class Question extends ASBase<QuestionFields>{
|
|
constructor(fields: QuestionFields) {
|
|
super({
|
|
type: ASModelType.Question,
|
|
...fields
|
|
})
|
|
}
|
|
} |