DefinitelyTyped/types/ndarray/index.d.ts
taoqf 31e2829a1b export Data from ndarray (#16251)
* add weixin-app

* add wx

* add new line at end of file

* tslint wx and wx-app

* fixed test error

* change project name weixin

* rename

* weixin-app Add param this

* change discription of jweixin

* add some Event declaration

* change tslint config
extends dtslint/dt.json

* add defination of ccap, qr-image

* remove redundant jsdoc

* remove doc

* allow overloads

* inline some types

* fix tslint error

* ndarray
add tslint
export like a module style

* ndarray make ndarray as a interface

* ndarray: export type Data
2017-05-02 09:28:49 -07:00

37 lines
1.1 KiB
TypeScript

// Type definitions for ndarray 1.0
// Project: https://github.com/scijs/ndarray
// Definitions by: Giff Song <https://github.com/pawsong/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function ndarray(
data: ndarray.Data, shape?: number[], stride?: number[], offset?: number
): ndarray;
interface ndarray {
data: ndarray.Data;
shape: number[];
stride: number[];
offset: number;
dtype: 'int8' | 'int16' | 'int32' | 'uint8' | 'uint16' | 'uint32' |
'float32' | 'float64' | 'array' | 'uint8_clamped' | 'buffer' | 'generic';
size: number;
order: number[];
dimension: number;
get(...args: number[]): number;
set(...args: number[]): number;
index(...args: number[]): number;
lo(...args: number[]): ndarray;
hi(...args: number[]): ndarray;
step(...args: number[]): ndarray;
transpose(...args: number[]): ndarray;
pick(...args: number[]): ndarray;
}
declare namespace ndarray {
type Data = number[] | Int8Array | Int16Array | Int32Array |
Uint8Array | Uint16Array | Uint32Array |
Float32Array | Float64Array | Uint8ClampedArray;
}
export = ndarray;