import moment from 'moment'; import Promise from 'bluebird'; import type Hexo from './index'; import type { NodeJSLikeCallback, RenderData } from '../types'; interface Result { path: string; content: string; } interface PostData { title?: string | number; layout?: string; slug?: string | number; path?: string; date?: moment.Moment; [prop: string]: any; } declare class Post { context: Hexo; constructor(context: Hexo); create(data: PostData, callback?: NodeJSLikeCallback): Promise; create(data: PostData, replace: boolean, callback?: NodeJSLikeCallback): Promise; _getScaffold(layout: string): Promise; _renderScaffold(data: PostData): Promise; publish(data: PostData, replace?: boolean): Promise; publish(data: PostData, callback?: NodeJSLikeCallback): Promise; publish(data: PostData, replace: boolean, callback?: NodeJSLikeCallback): Promise; render(source: string, data?: RenderData, callback?: NodeJSLikeCallback): any; } export = Post;