# @types/idyll-compiler

> TypeScript definitions for idyll-compiler

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

## Install

```sh
npm install @types/idyll-compiler
pnpm add @types/idyll-compiler
yarn add @types/idyll-compiler
bun add @types/idyll-compiler
```

## 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.1.6 |
| Published | 2023-11-07 |
| First published | 2018-05-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51430 |
| Maintainers | types |

## Links

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

## Recent versions

- 3.1.6 (latest) — 2023-11-07
- 3.1.3 (ts3.6) — 2021-07-08
- 3.1.2 (ts2.8) — 2019-03-12
- 3.1.5 — 2023-10-18
- 3.1.4 — 2023-09-26
- 3.1.1 — 2019-02-13
- 3.1.0 — 2018-05-01

## README

# Installation
> `npm install --save @types/idyll-compiler`

# Summary
This package contains type definitions for idyll-compiler (https://github.com/idyll-lang/idyll/tree/master/packages/idyll-compiler).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/idyll-compiler.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/idyll-compiler/index.d.ts)
````ts
declare namespace compiler {
    type PropType = "variable" | "value" | "expression";
    type PropData = string | number | boolean;
    type PropKey = string;
    type PropValue = [PropType, PropData];
    type Property = [PropKey, PropValue];
    type __RecursiveNode<T> = [string, Property[], T[]];
    interface TreeNode extends __RecursiveNode<Node> {}
    type Node = TreeNode | string;
    type AST = Node[];

    type PostProcessor =
        | ((ast: AST) => AST)
        | ((ast: AST, callback: (err: any, value: AST) => void) => void);

    interface Options {
        spellcheck?: boolean | undefined;

        smartquotes?: boolean | undefined;

        /**
         * If false and there is no postprocessors, compiler returns the AST synchronously
         * Otherwise, a promise is returned
         */
        async?: boolean | undefined;

        /**
         * compiler plugins
         * If provided, compiler always compiles asynchronously
         */
        postProcessors?: PostProcessor[] | undefined;
    }
}

/**
 * Compiles the given idyllMarkup and returns an AST either synchronously
 * or asynchronously.
 *
 * If postProcessors are provided or options.async is set to true:
 *      compiler returns a promise
 * Otherwise, compile returns the AST synchronously
 */
declare function compiler(
    input: string,
    options?: compiler.Options,
    callback?: () => void,
): Promise<compiler.AST> | compiler.AST;

export = compiler;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 03:09:37 GMT
 * Dependencies: none

# Credits
These definitions were written by [Thanh Ngo](https://github.com/iocat).

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