defineQuestion(input?: Question)stringstring|AnswerdefineQuestion({
name: 'What is the meaning of life?',
acceptedAnswer: '42',
})
Question${canonicalUrl}#/schema/question/${questionId}options.defaultLanguage (see: user Config)See Global Resolves for full context.
@id is resolved using a hash of the question name if not providedmainEntity/**
* A specific question - e.g. from a user seeking answers online, or collected in a Frequently Asked Questions (FAQ) document.
*/
export interface QuestionSimple extends Thing {
/**
* The text content of the question.
*/
name: string
/**
* An answer object, with a text property which contains the answer to the question.
*/
acceptedAnswer: NodeRelation<Answer | string>
/**
* The language code for the question; e.g., en-GB.
*/
inLanguage?: string
/**
* The number of answers provided for this question.
*/
answerCount?: number
/**
* The date and time the question was created.
*/
dateCreated?: string
/**
* Alias for `name`
*/
question?: string
/**
* Alias for `acceptedAnswer`
*/
answer?: string
}
/**
* An answer offered to a question; perhaps correct, perhaps opinionated or wrong.
*/
export interface Answer extends Optional<Thing, '@id'> {
text: string
}