Skip to content

Update TS definition to reference proper internal libraries #1089

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 27, 2020
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
18 changes: 8 additions & 10 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
declare interface Buffer extends ArrayBuffer { }
declare interface Stream { }
declare interface Writable { }

export const enum RelationshipType {
None = 0,
Expand Down Expand Up @@ -1254,7 +1252,7 @@ export interface Xlsx {
* read from a stream
* @param stream
*/
read(stream: Stream): Promise<Workbook>;
read(stream: import('stream').Stream): Promise<Workbook>;

/**
* load from an array buffer
Expand All @@ -1265,7 +1263,7 @@ export interface Xlsx {
/**
* Create input stream for reading
*/
createInputStream(): Writable;
createInputStream(): import('events').EventEmitter;

/**
* write to a buffer
Expand All @@ -1280,7 +1278,7 @@ export interface Xlsx {
/**
* write to a stream
*/
write(stream: Stream, options?: Partial<XlsxWriteOptions>): Promise<void>;
write(stream: import('stream').Stream, options?: Partial<XlsxWriteOptions>): Promise<void>;
}

export interface CsvReadOptions {
Expand All @@ -1302,12 +1300,12 @@ export interface Csv {
/**
* read from a stream
*/
read(stream: Stream, options?: Partial<CsvReadOptions>): Promise<Worksheet>;
read(stream: import('stream').Stream, options?: Partial<CsvReadOptions>): Promise<Worksheet>;

/**
* Create input stream for reading
*/
createInputStream(): Writable;
createInputStream(): import('events').EventEmitter;

/**
* write to a buffer
Expand All @@ -1322,7 +1320,7 @@ export interface Csv {
/**
* write to a stream
*/
write(stream: Stream, options?: Partial<CsvWriteOptions>): Promise<void>;
write(stream: import('stream').Stream, options?: Partial<CsvWriteOptions>): Promise<void>;
}

export interface Media {
Expand Down Expand Up @@ -1619,7 +1617,7 @@ export namespace stream {
/**
* Specifies a writable stream to write the XLSX workbook to.
*/
stream: Stream;
stream: import('stream').Stream;

/**
* If stream not specified, this field specifies the path to a file to write the XLSX workbook to.
Expand Down Expand Up @@ -1690,4 +1688,4 @@ export namespace stream {
addWorkbook(): Promise<void>;
}
}
}
}