# @types/jsbarcode

> TypeScript definitions for jsbarcode

Latest version **3.11.4** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/jsbarcode
pnpm add @types/jsbarcode
yarn add @types/jsbarcode
bun add @types/jsbarcode
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 3.11.4 |
| Published | 2023-11-07 |
| First published | 2020-10-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51440 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/jsbarcode
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jsbarcode
- npm.io page: https://npm.io/package/@types/jsbarcode

## Dependencies (1)

- [@types/node](https://npm.io/package/@types/node.md) *

## Recent versions

- 3.11.4 (latest) — 2023-11-07
- 3.11.1 (ts3.6) — 2021-07-08
- 3.11.0 (ts3.2) — 2020-10-12
- 3.11.3 — 2023-10-18
- 3.11.2 — 2023-09-15

## README

# 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](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jsbarcode/index.d.ts)
````ts
/// <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: Tue, 07 Nov 2023 03:09:37 GMT
 * Dependencies: [@types/node](https://npmjs.com/package/@types/node)

# Credits
These definitions were written by [Domien Bakker](https://github.com/domienbakker).

---
_Source: https://npm.io/package/@types/jsbarcode · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
