Skip to content

Commit

Permalink
fix: #349: correct imports in type file
Browse files Browse the repository at this point in the history
  • Loading branch information
modesty committed Jul 6, 2024
1 parent 1631b1e commit acbce6d
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions pdfparser.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import { EventEmitter } from "events";
import { EventEmitter } from "node:events";
import { Transform, Readable, TransformOptions, TransformCallback } from "node:stream";
import fs from "node:fs";

declare class PDFParser extends EventEmitter{
export declare class StringifyStream extends Transform {
constructor(options?: TransformOptions);
_transform(obj: any, encoding: string, callback: TransformCallback): void;
}

export declare class ParserStream{
static createContentStream(jsonObj): Readable
static createOutputStream(outputPath, resolve, reject): fs.WriteStream
}

export declare class PDFParser extends EventEmitter{
static get ParserStream(): typeof ParserStream
static get StringifyStream(): typeof StringifyStream
static get pkInfo(): { version: string; name: string; description: string; author: string; license: string; }
Expand All @@ -26,12 +38,6 @@ export type EventMap = {
"data": (data: Output["Pages"][number]|null) => void;
}

declare class ParserStream{
static createContentStream(jsonObj): Readable
static createOutputStream(outputPath, resolve, reject): fs.WriteStream
}


export interface Output{
Transcoder: string,
Meta: Record<string, object>
Expand Down

0 comments on commit acbce6d

Please sign in to comment.