stackexchange-api
Version:
A Node.js wrapper for the StackExchange API
36 lines (35 loc) • 1.22 kB
TypeScript
import { ShallowUser } from './ShallowUser';
import { TypeComment } from '../interfaces/result-types/TypeComment';
/**
* The equivalent of [Type comment](https://api.stackexchange.com/docs/types/comment).<br>
* All [[Question|Questions]] and [[Answer|Answers]] on a [Stack Exchange site](https://stackexchange.com/sites) can be commented on, and this object represents those Comments.<br>
* Comments can also be optionally directed at users, when this is the case the [[replyToUser]] property is set.
*/
export declare class Comment {
body: string | null;
bodyMarkdown: string | null;
canFlag: boolean | null;
/**
* Refers to a [[Comment]]
*/
commentId: number | null;
creationDate: Date | null;
edited: boolean | null;
link: string | null;
/**
* *May be absent, in which case it is set to `null`*
*/
owner: ShallowUser | null;
/**
* Refers to a [[Post]]
*/
postId: number | null;
postType: 'question' | 'answer' | null;
/**
* *May be absent, in which case it is set to `null`*
*/
replyToUser: ShallowUser | null;
score: number | null;
upvoted: boolean | null;
constructor(comment?: TypeComment);
}