3.11.4 • Published 2 years ago

@types/jsbarcode v3.11.4

Weekly downloads
970
License
MIT
Repository
github
Last release
2 years ago

Installation

npm install --save @types/jsbarcode

Summary

This package contains type definitions for jsbarcode (https://github.com/lindell/JsBarcode).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jsbarcode.

index.d.ts

// Type definitions for jsbarcode 3.11
// Project: https://github.com/lindell/JsBarcode
// Definitions by: Domien Bakker <https://github.com/domienbakker>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

/// <reference types="node" />

declare namespace JsBarcode {
    function getModule(name: string): () => void;
    interface JsBarcodeOptions {
        format: string;
        width?: number | undefined;
        height?: number | undefined;
        displayValue?: boolean | undefined;
        text?: string | undefined;
        fontOptions?: string | undefined;
        font?: string | undefined;
        textAlign?: string | undefined;
        textPosition?: string | undefined;
        textMargin?: number | undefined;
        fontSize?: number | undefined;
        background?: string | undefined;
        lineColor?: string | undefined;
        margin?: number | undefined;
        marginTop?: number | undefined;
        marginBottom?: number | undefined;
        marginLeft?: number | undefined;
        marginRight?: number | undefined;
        flat?: boolean | undefined;
        valid?(valid: boolean): void;
    }
}

/**
 * The Browser version of the library's functionality, which makes use of an HTMLCanvasElement, HTMLImageElement or SVGElement
 * for rendering.
 * @param svg ID string or HTML element of the target to render within.
 * @param barcodeText Text to be rendered.
 * @param barcodeOptions Options used for rendering.
 */
declare function JsBarcode(
    svg: string | HTMLCanvasElement | HTMLImageElement | SVGElement,
    barcodeText: string,
    barcodeOptions?: JsBarcode.JsBarcodeOptions
): void;

export = JsBarcode;

Additional Details

  • Last updated: Thu, 08 Jul 2021 16:22:46 GMT
  • Dependencies: @types/node
  • Global values: none

Credits

These definitions were written by Domien Bakker.

3.11.2

2 years ago

3.11.4

2 years ago

3.11.3

2 years ago

3.11.1

4 years ago

3.11.0

5 years ago