UNPKG

stackexchange-api

Version:
66 lines (65 loc) 2.06 kB
import { Comment } from './Comment'; import { ShallowUser } from './ShallowUser'; import { TypeAnswer } from '../interfaces/result-types/TypeAnswer'; /** * The equivalent of [Type answer](https://api.stackexchange.com/docs/types/answer).<br> * This object represents an Answer to a [[Question]] on one of the [Stack Exchange sites](https://stackexchange.com/sites).<br> * As on the [[Question]] page, it is possible to fetch the [[Comment|Comments]] on an Answer as part of a call; though this is not done by default. */ export declare class Answer { accepted: boolean | null; /** * Refers to an [[Answer]] */ answerId: number | null; /** * *May be absent, in which case it is set to `null`* */ awardedBountyAmount: number | null; /** * *May be absent, in which case it is set to `null`* */ awardedBountyUsers: ShallowUser[] | null; body: string | null; bodyMarkdown: string | null; canFlag: boolean | null; commentCount: number | null; /** * *May be absent, in which case it is set to `null`* */ comments: Comment[] | null; /** * *May be absent, in which case it is set to `null`* */ communityOwnedDate: Date | null; creationDate: Date | null; downVoteCount: number | null; downvoted: boolean | null; isAccepted: boolean | null; lastActivityDate: Date | null; /** * *May be absent, in which case it is set to `null`* */ lastEditDate: Date | null; lastEditor: ShallowUser | null; link: string | null; /** * *May be absent, in which case it is set to `null`* */ lockedDate: Date | null; /** * *May be absent, in which case it is set to `null`* */ owner: ShallowUser | null; /** * Refers to a [[Question]] */ questionId: number | null; score: number | null; shareLink: string | null; tags: string[] | null; title: string | null; upVoteCount: number | null; upvoted: boolean | null; constructor(answer?: TypeAnswer); }