Skip to content

Commit

Permalink
chore(.prettierignore): ignore auto-generate types
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs committed Jan 16, 2024
1 parent cafd051 commit 7ea841d
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 54 deletions.
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ dist
package.json
API.md
CHANGELOG.md
/types/index.d.ts

# lock files
bun.lockb
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"node": ">=18.0.0"
},
"scripts": {
"build": "tsc && jsdoc2md src/index.js > API.md && npm run lint:prettier:fix",
"build": "tsc && jsdoc2md src/index.js > API.md",
"jest": "jest",
"jest:coverage": "jest --coverage",
"lint": "eslint . --cache --ext js,jsx --ignore-path .gitignore",
Expand Down
103 changes: 50 additions & 53 deletions types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,56 +1,53 @@
export default UnRTF;
export class UnRTF {
/**
* @param {string} [binPath] - Path of UnRTF binary.
* If not provided, the constructor will attempt to find the binary
* in the PATH environment variable.
*
* For `win32`, a binary is bundled with the package and will be used
* if a local installation is not found.
*/
constructor(binPath?: string);
/** @type {string|undefined} */
unrtfPath: string | undefined;
/** @type {string|undefined} */
unrtfVersion: string | undefined;
/** @type {object} */
unrtfAcceptedOptions: object;
/**
* @author Frazer Smith
* @description Converts an RTF file to HTML/LaTeX/RTF/TXT.
* Defaults to HTML output if no `output*` options are provided.
* UnRTF will use the directory of the original file to store embedded pictures.
* @param {string} file - Filepath of the RTF file to read.
* @param {object} [options] - Object containing options to pass to binary.
* @param {boolean} [options.noPictures] - Disable the automatic storing of embedded
* pictures to the directory of the original file.
* @param {boolean} [options.noRemap] - Disable charset conversion (only works for 8-bit charsets)
* (UnRTF v0.20.5 or later only).
* @param {boolean} [options.outputHtml] - Generate HTML output.
* @param {boolean} [options.outputLatex] - Generate LaTeX output.
* @param {boolean} [options.outputPs] - Generate PostScript (PS) output (UnRTF v0.19.4 or earlier only).
* @param {boolean} [options.outputRtf] - Generate RTF output. (UnRTF v0.21.3 or later only).
* @param {boolean} [options.outputText] - Generate ASCII text output.
* @param {boolean} [options.outputVt] - Generate text output with VT100 escape codes.
* @param {boolean} [options.outputWpml] - Generate WPML output (UnRTF v0.19.4 or earlier only).
* @param {boolean} [options.printVersionInfo] - Print copyright and version info.
* @param {boolean} [options.quiet] - Do not print any leading comments in output (UnRTF v0.21.3 or later only).
* @returns {Promise<string>} A promise that resolves with a stdout string, or rejects with an `Error` object.
*/
convert(
file: string,
options?: {
noPictures?: boolean;
noRemap?: boolean;
outputHtml?: boolean;
outputLatex?: boolean;
outputPs?: boolean;
outputRtf?: boolean;
outputText?: boolean;
outputVt?: boolean;
outputWpml?: boolean;
printVersionInfo?: boolean;
quiet?: boolean;
}
): Promise<string>;
/**
* @param {string} [binPath] - Path of UnRTF binary.
* If not provided, the constructor will attempt to find the binary
* in the PATH environment variable.
*
* For `win32`, a binary is bundled with the package and will be used
* if a local installation is not found.
*/
constructor(binPath?: string);
/** @type {string|undefined} */
unrtfPath: string | undefined;
/** @type {string|undefined} */
unrtfVersion: string | undefined;
/** @type {object} */
unrtfAcceptedOptions: object;
/**
* @author Frazer Smith
* @description Converts an RTF file to HTML/LaTeX/RTF/TXT.
* Defaults to HTML output if no `output*` options are provided.
* UnRTF will use the directory of the original file to store embedded pictures.
* @param {string} file - Filepath of the RTF file to read.
* @param {object} [options] - Object containing options to pass to binary.
* @param {boolean} [options.noPictures] - Disable the automatic storing of embedded
* pictures to the directory of the original file.
* @param {boolean} [options.noRemap] - Disable charset conversion (only works for 8-bit charsets)
* (UnRTF v0.20.5 or later only).
* @param {boolean} [options.outputHtml] - Generate HTML output.
* @param {boolean} [options.outputLatex] - Generate LaTeX output.
* @param {boolean} [options.outputPs] - Generate PostScript (PS) output (UnRTF v0.19.4 or earlier only).
* @param {boolean} [options.outputRtf] - Generate RTF output. (UnRTF v0.21.3 or later only).
* @param {boolean} [options.outputText] - Generate ASCII text output.
* @param {boolean} [options.outputVt] - Generate text output with VT100 escape codes.
* @param {boolean} [options.outputWpml] - Generate WPML output (UnRTF v0.19.4 or earlier only).
* @param {boolean} [options.printVersionInfo] - Print copyright and version info.
* @param {boolean} [options.quiet] - Do not print any leading comments in output (UnRTF v0.21.3 or later only).
* @returns {Promise<string>} A promise that resolves with a stdout string, or rejects with an `Error` object.
*/
convert(file: string, options?: {
noPictures?: boolean;
noRemap?: boolean;
outputHtml?: boolean;
outputLatex?: boolean;
outputPs?: boolean;
outputRtf?: boolean;
outputText?: boolean;
outputVt?: boolean;
outputWpml?: boolean;
printVersionInfo?: boolean;
quiet?: boolean;
}): Promise<string>;
}

0 comments on commit 7ea841d

Please sign in to comment.