# @types/hjson

> TypeScript definitions for hjson

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

## Install

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

## 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 | 2.4.6 |
| Published | 2023-11-07 |
| First published | 2017-07-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51415 |
| Maintainers | types |

## Links

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

## Recent versions

- 2.4.6 (latest) — 2023-11-07
- 2.4.3 (ts3.6) — 2021-07-08
- 2.4.2 (ts3.0) — 2020-06-23
- 2.4.1 (ts2.0) — 2019-02-13
- 2.4.5 — 2023-10-18
- 2.4.4 — 2023-09-16
- 2.4.0 — 2017-07-14

## README

# Installation
> `npm install --save @types/hjson`

# Summary
This package contains type definitions for hjson (https://github.com/hjson/hjson-js).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/hjson.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/hjson/index.d.ts)
````ts
export interface DeserializeOptions {
    /**
     * keep white space and comments. This is useful if
     * you want to edit an hjson file and save it while preserving comments (default false)
     */
    keepWsc?: boolean | undefined;
    /**
     * Turn off legacy support for omitting root braces (defaults true)
     */
    legacyRoot?: boolean | undefined;
}

export interface SerializeOptions {
    /**
     * keep white space. See parse.
     */
    keepWsc?: boolean | undefined;
    /**
     * makes braces appear on the same line as the key name. Default false.
     */
    bracesSameLine?: boolean | undefined;
    /**
     * show braces for the root object. Default true.
     */
    emitRootBraces?: boolean | undefined;
    /**
     * controls how strings are displayed. (setting separator implies "strings")
     * "min": no quotes whenever possible (default)
     * "keys": use quotes around keys
     * "strings": use quotes around string values
     * "all": use quotes around keys and string values
     */
    quotes?: "min" | "keys" | "strings" | "all" | undefined;
    /**
     * controls how multiline strings are displayed. (setting quotes implies "off")
     * "std": strings containing \n are shown in multiline format (default)
     * "no-tabs": like std but disallow tabs
     * "off": show in JSON format
     */
    multiline?: "std" | "no-tabs" | "off" | undefined;
    /**
     * output a comma separator between elements. Default false
     */
    separator?: boolean | undefined;
    /**
     * specifies the indentation of nested structures.
     * If it is a number, it will specify the number of spaces to indent at each level.
     * If it is a string (such as '\t' or ' '), it contains the characters used to indent at each level.
     */
    space?: number | string | undefined;
    /**
     * specifies the EOL sequence (default is set by Hjson.setEndOfLine())
     */
    eol?: string | undefined;
    /**
     * output ascii color codes
     */
    colors?: boolean | undefined;
}

/*~ If this module has methods, declare them as functions like so.
 */
export function parse(text: string, options?: DeserializeOptions): any;
export function stringify(value: any, options?: SerializeOptions): string;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 03:09:37 GMT
 * Dependencies: none

# Credits
These definitions were written by [Mark van Straten](https://github.com/crunchie84), and [Ashik Meerankutty](https://github.com/ashikmeerankutty).

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