Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ const UNRTF_VERSION_REG = /^(\d{1,2}\.\d{1,2}\.\d{1,2})/u;
* @property {boolean} [quiet] Do not print any leading comments in output (UnRTF v0.21.3 or later only).
*/

/**
* @typedef {object} UnRTFExtraOptions
* @property {AbortSignal} [signal] An `AbortSignal` that can be used to cancel the operation.
*/

/**
* @author Frazer Smith
* @description Checks each option provided is valid, of the correct type, and can be used by specified
Expand Down Expand Up @@ -245,8 +250,7 @@ class UnRTF {
* UnRTF will use the directory of the original file to store embedded pictures.
* @param {string} file - Filepath of the RTF file to read.
* @param {UnRTFOptions} [options] - Options to pass to UnRTF binary.
* @param {object} [extras] - Extra options.
* @param {AbortSignal} [extras.signal] - An `AbortSignal` that can be used to cancel the operation.
* @param {UnRTFExtraOptions} [extras] - Non-CLI options.
* @returns {Promise<string>} A promise that resolves with a stdout string, or rejects with an `Error` object.
* @throws {Error} If the file is missing, not an RTF file, or if UnRTF returns an error.
*/
Expand Down