UNPKG

imdone-core

Version:
377 lines (376 loc) 12.1 kB
export class File extends Emitter<[never]> { static CODE_STYLE_PATTERN: string; static CHECK_STYLE_PATTERN: RegExp; static getTaskId: typeof getTaskId; static trimBlankLines: typeof trimBlankLines; static padDescription: typeof padDescription; static isListNameValid(listName: any): any; static getUnixContent(content: any): any; static isMetaNewLine(config: any): any; static isAddCompletedMeta(config: any): any; static isFile(file: any): file is File; static isMarkdown(relPath: any): boolean; static addStarted({ task, content, config }: { task: any; content: any; config: any; }): any; static addCompleted({ task, content, config }: { task: any; content: any; config: any; }): any; static parseDueDate(config: any, text: any): any; static parseRemindDate(config: any, text: any): any; static parseDeferDate(config: any, text: any): any; static parseDate(config: any, text: any, dateType: any): any; constructor(opts: any); project: any; projectContext: any; repoId: any; path: any; content: any; modifiedTime: any; createdTime: any; languages: any; modified: boolean | undefined; frontMatter: { tags: never[]; context: never[]; meta: {}; } | undefined; tasks: any[] | undefined; isDir: boolean | undefined; lineCount: number | undefined; deleted: boolean | undefined; removeCompleted({ task, content, config }: { task: any; content: any; config: any; }): any; trackListChanges({ task, content, config, modify }: { task: any; content: any; config: any; modify: any; }): { content: any; beforeTextModified: boolean; }; removeMetaData(content: any, key: any, value: any): any; transformTask({ config, modify, task }: { config: any; modify: any; task: any; }): void; transformTasks(config: any, modify: any): void; extractCodeStyleTasks(config: any, pos: any, content: any): void; extractHashStyleTasks(config: any, pos: any, content: any): void; extractLinkStyleTasks(config: any, pos: any, content: any): void; extractCheckboxTasks(config: any, pos: any, content: any): void; extractTasks(config: any): this; extractAndTransformTasks(config: any): void; extractTasksInCodeFile(config: any): void; extractTasksInNonCodeFile(config: any): void; deleteBlankLine(lineNo: any): void; deleteTaskContent(beforeContent: any, afterContent: any): void; deleteDescription(task: any, config: any): void; deleteCodeOrHashTask(re: any, task: any, config: any): this; deleteTask(task: any, config: any): void; modifyTask(task: any, config: any, noEmit: any): void; modifyCodeOrHashTask(re: any, task: any, config: any, noEmit: any): this; modifyTaskFromHtml(task: any, html: any): void; modifyTaskFromContent(task: any, content: any, config: any): void; modifyDescription(task: any, config: any): void; extractTaskWithDescription({ taskStartOnLine, rawTask, config, list, text, order, line, type, hasColon, content, inBlockComment, singleLineBlockComment, pos, }: { taskStartOnLine: any; rawTask: any; config: any; list: any; text: any; order: any; line: any; type: any; hasColon: any; content: any; inBlockComment: any; singleLineBlockComment: any; pos: any; }): { readonly settings: any; readonly fields: any; readonly maxLines: any; interpretedContent: any; innerInterpretedContent: any; init(totals?: any): /*elided*/ any; totals: any; onTaskUpdate(): void; initProps(): void; props: any; initComputed(): void; computed: any; initActions(): void; links: any[] | undefined; readonly projectPath: any; readonly relPath: any; readonly fullPath: string | undefined; readonly defaultData: { allContext: any; allMeta: any; allTags: any; beforeText: any; completed: any; content: any; context: any; created: any; due: any; filteredListName: any; fullPath: string | undefined; id: any; interpretedContent: any; lastLine: any; line: any; list: any; meta: any; metaKeys: string[] | undefined; progress: any; projectPath: any; rawTask: any; relPath: any; source: any; started: any; tags: any; text: any; topics: string[] | undefined; totals: any; }; initData(): void; dataKeys: string[] | undefined; data: any; updateDescriptionData(): void; desc: { title: any; html: any; truncHtml: any; encodedText: string; encodedMD: string; markdown: any; rawMarkdown: any; htmlLength: any; htmlTruncLength: any; isOverMaxLines: any; } | undefined; getEncodedText(content: any): string; getContentData(content: any): { encodedMD: string; encodedText: string; content: any; }; formatContent(content: any, mustache: any): { encodedMD: string; encodedText: string; content: any; }; format(content: any, mustache: any): any; getCardMarkdown(): { totalLines: number; markdown: string; rawMarkdown: string; }; truncLines: any; getHtml(content: any): { html: any; truncHtml: any; }; getDescriptionData(): { title: any; html: any; truncHtml: any; encodedText: string; encodedMD: string; markdown: any; rawMarkdown: any; htmlLength: any; htmlTruncLength: any; isOverMaxLines: any; }; frontMatter: any; pos: any; rawTask: any; beforeText: any; text: any; list: any; order: number | undefined; hasColon: any; line: any; id: any; repoId: any; source: any; type: any; tags: any; context: any; meta: any; metaIndex: any; inBlockComment: any; singleLineBlockComment: any; description: any; rawTaskContentLines: any; taskStartOnLine: any; commentStartOnLine: any; descriptionStartsWith: any; filteredListName: any; isWrappedWithCardTag: any; config: any; allMeta: any; allContext: any; allTags: any; progress: any; content: any; lastLine: any; orderModified: any; index: any; innerOrder: any; readonly descriptionString: any; updateLastLine(): void; getLastLine(): any; parse(): void; paddingLength: number | undefined; metaKeys: string[] | undefined; topics: string[] | undefined; issueNumberRegExp(): RegExp; readonly listId: any; readonly path: any; readonly markdownBeforeText: string; getTextAndDescription(): any; getRawTextAndDescription(): any; getProgress(): { completed: any; total: any; }; getContent(): any; updateContent(): void; updateFromContent(content: any): void; toJSON(): /*elided*/ any & { allTags: any; allContext: any; allMeta: any; config: undefined; expand: boolean; }; getTagPrefix(): any; getCommentTagsOnly(): any; addToLastCommentInContent(content: any, toAdd: any, newLine: any): string; getCheckedData(): { pad: number; checked: boolean; } | null; updateOrderMeta(config: any, descContent?: any): undefined; replaceContent(regex: any, replacement: any): void; replaceMetaSep(oldMetaSep: any, newMetaSep: any): void; updateContext(): void; parseTodoTxt(): void; getTags(): any[]; getContext(): any[]; getDueMeta(): any; getMetaData(): any; getListTrackingMeta(lists: any): any[]; hasListChanged(lists: any): boolean; hasMetaData(key: any, value: any): any; getMetaDataWithLinks(config: any): any[]; getMetaLink(config: any, metaKey: any, metaValue: any): { title: string; url: string; icon: any; } | undefined; toString(): string; getRepoId(): any; getSource(): any; getId(): any; getList(): any; getText(opts: any, text: any): any; getChecksFromHtml(html: any): boolean[]; getLine(): any; getType(): any; equals(task: any): boolean | undefined; }; tasksMatch(config: any, task: any, line: any, taskText: any): any; getTaskAtLine(line: any): any; getLinePos(lineNo: any): any; getLineNumber(pos: any, content?: any): number; toJSON(): {}; getRepoId(): any; getPath(): any; getFullPath(): string; getId(): any; reset(): this; previousContent: any; rollback(): this; setContent(content: any): this; setContentFromFile(content: any): this; getContent(): any; getContentForFile(): string; getContentLines(): string[]; setModifiedTime(modifiedTime: any): this; setCreatedTime(createdTime: any): this; getCreatedTime(): any; getModifiedTime(): any; setModified(modified: any): this; isModified(): boolean | undefined; getType(): string; getTasks(): any[] | undefined; getTask(id: any): any; addTask(task: any): this; removeTask(task: any): void; isMarkDownFile(): boolean; getLang(): any; getExt(): string; isCodeFile(): any; getBeforeText(line: any, pos: any): any; getDescriptionChars(inBlockComment: any): any; getTaskContent({ config, content, inBlockComment, beforeText, }: { config: any; content: any; inBlockComment: any; beforeText: any; }): { rawTaskContentLines: string[]; taskContentLines: string[]; } | undefined; isCheckBoxTask(config: any, line: any, beforeText: any): boolean | undefined; getCodeCommentRegex(): RegExp; trimCommentStart(text: any): any; trimCommentBlockEnd(text: any): any; trimCommentBlockStart(text: any): any; trimCommentBlockIgnore(text: any): any; trimCommentChars(text: any): any; hasCodeStyleTask(config: any, text: any): any; hasTaskInText(config: any, text: any): boolean; isInBlockComment(content: any): any; startsWithCommentOrSpace(pos: any): boolean; isSingleLineBlockComment(content: any): boolean; parseFrontMatter(config: any): { [key: string]: any; }; getSource(): { path: any; id: any; repoId: any; type: string; ext: string; lang: any; modified: boolean | undefined; modifiedTime: any; createdTime: any; }; isWithinCodeSpanOrBlock(pos: any, content: any): boolean; getMarkdownCodePositions(text: any): { start: number; end: number; }[]; isResultInMarkdownCode(positions: any, index: any): any; } import Emitter from 'events'; declare function getTaskId(path: any, line: any, text: any): string; declare function trimBlankLines(content: any, isCodeFile: any): any; declare function padDescription(description?: any[], beforeText?: string): any[]; export {};