DefinitelyTyped

Index

Variables

Dynamic modules

Modules

Interfaces

Functions

Variables

Buffer: Buffer

deprecated

(index: number): number

Parameters

  • index: number

Returns

number

public length: number

public copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number

Parameters

  • targetBuffer: Buffer
  • targetStart?: number optional
  • sourceStart?: number optional
  • sourceEnd?: number optional

Returns

number

public fill(value: any, offset?: number, end?: number)

Parameters

  • value: any
  • offset?: number optional
  • end?: number optional

public readDoubleBE(offset: number, noAssert?: boolean): number

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

number

public readDoubleLE(offset: number, noAssert?: boolean): number

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

number

public readFloatBE(offset: number, noAssert?: boolean): number

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

number

public readFloatLE(offset: number, noAssert?: boolean): number

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

number

public readInt16BE(offset: number, noAssert?: boolean): number

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

number

public readInt16LE(offset: number, noAssert?: boolean): number

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

number

public readInt32BE(offset: number, noAssert?: boolean): number

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

number

public readInt32LE(offset: number, noAssert?: boolean): number

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

number

public readInt8(offset: number, noAssert?: boolean): number

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

number

public readUInt16BE(offset: number, noAssert?: boolean): number

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

number

public readUInt16LE(offset: number, noAssert?: boolean): number

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

number

public readUInt32BE(offset: number, noAssert?: boolean): number

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

number

public readUInt32LE(offset: number, noAssert?: boolean): number

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

number

public readUInt8(offset: number, noAsset?: boolean): number

Parameters

  • offset: number
  • noAsset?: boolean optional

Returns

number

public slice(start?: number, end?: number): Buffer

Parameters

  • start?: number optional
  • end?: number optional

Returns

Buffer

public toJSON(): any

Returns

any

public toString(encoding?: string, start?: number, end?: number): string

Parameters

  • encoding?: string optional
  • start?: number optional
  • end?: number optional

Returns

string

public write(string: string, offset?: number, length?: number, encoding?: string): number

Parameters

  • string: string
  • offset?: number optional
  • length?: number optional
  • encoding?: string optional

Returns

number

public writeDoubleBE(value: number, offset: number, noAssert?: boolean)

Parameters

  • value: number
  • offset: number
  • noAssert?: boolean optional

public writeDoubleLE(value: number, offset: number, noAssert?: boolean)

Parameters

  • value: number
  • offset: number
  • noAssert?: boolean optional

public writeFloatBE(value: number, offset: number, noAssert?: boolean)

Parameters

  • value: number
  • offset: number
  • noAssert?: boolean optional

public writeFloatLE(value: number, offset: number, noAssert?: boolean)

Parameters

  • value: number
  • offset: number
  • noAssert?: boolean optional

public writeInt16BE(value: number, offset: number, noAssert?: boolean)

Parameters

  • value: number
  • offset: number
  • noAssert?: boolean optional

public writeInt16LE(value: number, offset: number, noAssert?: boolean)

Parameters

  • value: number
  • offset: number
  • noAssert?: boolean optional

public writeInt32BE(value: number, offset: number, noAssert?: boolean)

Parameters

  • value: number
  • offset: number
  • noAssert?: boolean optional

public writeInt32LE(value: number, offset: number, noAssert?: boolean)

Parameters

  • value: number
  • offset: number
  • noAssert?: boolean optional

public writeInt8(value: number, offset: number, noAssert?: boolean)

Parameters

  • value: number
  • offset: number
  • noAssert?: boolean optional

public writeUInt16BE(value: number, offset: number, noAssert?: boolean)

Parameters

  • value: number
  • offset: number
  • noAssert?: boolean optional

public writeUInt16LE(value: number, offset: number, noAssert?: boolean)

Parameters

  • value: number
  • offset: number
  • noAssert?: boolean optional

public writeUInt32BE(value: number, offset: number, noAssert?: boolean)

Parameters

  • value: number
  • offset: number
  • noAssert?: boolean optional

public writeUInt32LE(value: number, offset: number, noAssert?: boolean)

Parameters

  • value: number
  • offset: number
  • noAssert?: boolean optional

public writeUInt8(value: number, offset: number, noAssert?: boolean)

Parameters

  • value: number
  • offset: number
  • noAssert?: boolean optional

SlowBuffer: { prototype: Buffer; isBuffer(obj: any): boolean; byteLength(string: string, encoding?: string): number; concat(list: Buffer[], totalLength?: number): Buffer; new(str: string, encoding?: string): Buffer; new(size: number): Buffer; new(array: any[]): Buffer; }

constructor(): Buffer

Returns

Buffer

constructor(): Buffer

Returns

Buffer

constructor(): Buffer

Returns

Buffer

public SlowBuffer.prototype: Buffer

public byteLength(): number

Returns

number

optional .encoding.encoding?: string

.string.string: string

public concat(): Buffer

Returns

Buffer

.list.list: Buffer[]

optional .totalLength.totalLength?: number

public isBuffer(): boolean

Returns

boolean

.obj.obj: any

__dirname: string

__filename: string

exports: any

global: any

module: { exports: any; require(id: string): any; id: string; filename: string; loaded: boolean; parent: any; children: any[]; }

public module.children: Array<any>

public module.exports: any

public module.filename: string

public module.id: string

public module.loaded: boolean

public module.parent: any

public require(): any

Returns

any

.id.id: string

process: Process

                                          *
              GLOBAL                      *
                                          *

require: { resolve(id: string): string; cache: any; extensions: any; main: any; (id: string): any; }

(): any

Returns

any

public require.cache: any

public require.extensions: any

public require.main: any

public resolve(): string

Returns

string

.id.id: string

Functions

clearImmediate(immediateId: any)

Parameters

  • immediateId: any

clearInterval(intervalId: Timer)

Parameters

clearTimeout(timeoutId: Timer)

Parameters

complete(value?: any)

Complets an asynchronous task, allowing Jake's execution to proceed to the next task

Parameters

  • value?: any optional

    A value to return from the task.

desc(description: string)

Creates a description for a Jake Task (or FileTask, DirectoryTask). When invoked, the description that iscreated will be associated with whatever Task is created next.

Parameters

  • description: string

    The description for the Task

directory(name: string): DirectoryTask

Creates a Jake DirectoryTask. Can be used as a prerequisite for FileTasks, or for simply ensuring a directory exists for use with a Task's action.

Parameters

  • name: string

    The name of the DiretoryTask

Returns

DirectoryTask

fail(err?: Array<string>)

Causes Jake execution to abort with an error. Allows passing an optional error code, which will be used to set the exit-code of exiting process.

Parameters

  • err?: Array<string> optional

    The error to thow when aborting execution. If this argument is an Error object, it will simply be thrown. If a String, it will be used as the error-message. (If it is a multi-line String, the first line will be used as the Error message, and the remaining lines will be used as the error-stack.)

fail(err?: Array<Error>)

Parameters

  • err?: Array<Error> optional

fail(err?: Array<any>)

Parameters

  • err?: Array<any> optional

file(name: string, prereqs?: Array<string>, action?: () => void, opts?: FileTaskOptions): FileTask

Creates a Jake FileTask.

name

name The name of the Task

Parameters

  • name: string
  • prereqs?: Array<string> optional

    Prerequisites to be run before this task

  • action?: () => void optional

    The action to perform for this task

  • opts?: FileTaskOptions optional

    Perform this task asynchronously. If you flag a task with this option, you must call the global complete method inside the task's action, for execution to proceed to the next task.

Returns

FileTask

namespace(name: string, scope: () => void)

Creates a namespace which allows logical grouping of tasks, and prevents name-collisions with task-names. Namespaces can be nested inside of other namespaces.

Parameters

  • name: string

    The name of the namespace

  • scope: () => void

    The enclosing scope for the namespaced tasks

npmPublishTask(name: string, packageFiles: Array<string>): NpmPublishTask

Parameters

  • name: string

    The name of the NpmPublishTask

  • packageFiles: Array<string>

    The files to include in the package

Returns

NpmPublishTask

npmPublishTask(name: string, definition?: () => void): NpmPublishTask

Parameters

  • name: string
  • definition?: () => void optional

Returns

NpmPublishTask

setImmediate(callback: (...args: any[]) => void, args?: Array<any>): any

Parameters

  • callback: (...args: any[]) => void
  • args?: Array<any> optional

Returns

any

setInterval(callback: (...args: any[]) => void, ms: number, args?: Array<any>): Timer

Parameters

  • callback: (...args: any[]) => void
  • ms: number
  • args?: Array<any> optional

Returns

Timer

setTimeout(callback: (...args: any[]) => void, ms: number, args?: Array<any>): Timer

Parameters

  • callback: (...args: any[]) => void
  • ms: number
  • args?: Array<any> optional

Returns

Timer

task(name: string, prereqs?: Array<string>, action?: (...params: any[]) => any, opts?: TaskOptions): Task

Parameters

  • name: string

    The name of the Task

  • prereqs?: Array<string> optional

    Prerequisites to be run before this task

  • action?: (...params: any[]) => any optional

    The action to perform for this task

  • opts?: TaskOptions optional

Returns

Task

task(name: string, action?: (...params: any[]) => any, opts?: TaskOptions): Task

Parameters

  • name: string
  • action?: (...params: any[]) => any optional
  • opts?: TaskOptions optional

Returns

Task

task(name: string, opts?: TaskOptions, action?: (...params: any[]) => any): Task

Parameters

  • name: string
  • opts?: TaskOptions optional
  • action?: (...params: any[]) => any optional

Returns

Task