/* tslint:disable */
/* eslint-disable */

/**
 * Classify a preprocessed 28×28 image. Returns the 10 class probabilities followed by
 * the hidden-layer activations.
 */
export function digits_classify(input: Float32Array): Float32Array;

/**
 * [inputs, hidden units, outputs, weight bytes]
 */
export function digits_info(): Uint32Array;

/**
 * MNIST-style normalisation of a drawing: crop to the ink, scale the longer side to
 * 20 px (area averaging), place in a 28×28 frame with the centre of mass in the middle.
 * `ink` is one byte per pixel (0 = background). Returns 784 values in [0, 1], or an
 * empty vector for a blank drawing.
 */
export function digits_preprocess(ink: Uint8Array, w: number, h: number): Float32Array;

export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;

export interface InitOutput {
    readonly memory: WebAssembly.Memory;
    readonly digits_classify: (a: number, b: number) => [number, number];
    readonly digits_info: () => [number, number];
    readonly digits_preprocess: (a: number, b: number, c: number, d: number) => [number, number];
    readonly __wbindgen_externrefs: WebAssembly.Table;
    readonly __wbindgen_malloc: (a: number, b: number) => number;
    readonly __wbindgen_free: (a: number, b: number, c: number) => void;
    readonly __wbindgen_start: () => void;
}

export type SyncInitInput = BufferSource | WebAssembly.Module;

/**
 * Instantiates the given `module`, which can either be bytes or
 * a precompiled `WebAssembly.Module`.
 *
 * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
 *
 * @returns {InitOutput}
 */
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;

/**
 * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
 * for everything else, calls `WebAssembly.instantiate` directly.
 *
 * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
 *
 * @returns {Promise<InitOutput>}
 */
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
