Skip to content
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

remove declare module #299

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
22 changes: 10 additions & 12 deletions lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,22 @@
* Install with `npm install @types/node --save-dev`
*--------------------------------------------------------------------------------------------*/

declare module 'iconv-lite' {
// Basic API
export function decode(buffer: Buffer | Uint8Array, encoding: string, options?: Options): string;
// Basic API
export function decode(buffer: Buffer | Uint8Array, encoding: string, options?: Options): string;

export function encode(content: string, encoding: string, options?: Options): Buffer;
export function encode(content: string, encoding: string, options?: Options): Buffer;

export function encodingExists(encoding: string): boolean;
export function encodingExists(encoding: string): boolean;

// Stream API
export function decodeStream(encoding: string, options?: Options): NodeJS.ReadWriteStream;
// Stream API
export function decodeStream(encoding: string, options?: Options): NodeJS.ReadWriteStream;

export function encodeStream(encoding: string, options?: Options): NodeJS.ReadWriteStream;
export function encodeStream(encoding: string, options?: Options): NodeJS.ReadWriteStream;

// Low-level stream APIs
export function getEncoder(encoding: string, options?: Options): EncoderStream;
// Low-level stream APIs
export function getEncoder(encoding: string, options?: Options): EncoderStream;

export function getDecoder(encoding: string, options?: Options): DecoderStream;
}
export function getDecoder(encoding: string, options?: Options): DecoderStream;

export interface Options {
stripBOM?: boolean;
Expand Down