# @types/inline-critical

> TypeScript definitions for inline-critical

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

## Install

```sh
npm install @types/inline-critical
pnpm add @types/inline-critical
yarn add @types/inline-critical
bun add @types/inline-critical
```

## 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 | 5.3.4 |
| Published | 2023-11-07 |
| First published | 2020-03-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51432 |
| Maintainers | types |

## Links

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

## Recent versions

- 5.3.4 (latest) — 2023-11-07
- 5.3.1 (ts3.6) — 2021-07-08
- 5.3.0 (ts2.8) — 2020-03-12
- 5.3.3 — 2023-10-18
- 5.3.2 — 2023-09-26

## README

# Installation
> `npm install --save @types/inline-critical`

# Summary
This package contains type definitions for inline-critical (https://github.com/bezoerb/inline-critical#readme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/inline-critical.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/inline-critical/index.d.ts)
````ts
export = inline;

/**
 * @param html The HTML to use to inline critical styles.
 * @param styles The styles to inline.
 * @param options Optional configuration object.
 * @example
 * const html = fs.readFileSync('test/fixtures/index.html', 'utf8')
 * const critical = fs.readFileSync('tests/fixtures/critical.css', 'utf8')
 * const inlined = inline(html, critical)
 *
 * // ignoring stylesheets matching regex
 * const inlined = inline(html, critical, {ignore: [/bootstrap/]})
 */
declare function inline(html: string, styles: string, options?: inline.Options): string;

declare namespace inline {
    interface Options {
        /**
         * Whether to minify the styles before inlining.
         * @default true
         */
        minify?: boolean | undefined;

        /**
         * Whether to remove the inlined styles from any stylesheets referenced in the HTML.
         * @default false
         */
        extract?: boolean | undefined;

        /**
         * The path to be used when extracting styles to find the files references by `href` attributes.
         * @default process.cwd
         */
        basePath?: string | undefined;

        /**
         * Stylesheets to ignore when inlining.
         * @default []
         * @example [/bootstrap/]
         */
        ignore?: string | RegExp | Array<string | RegExp> | undefined;

        /** The selector for the element used by loadCSS as a reference for inlining. */
        selector?: string | undefined;

        /**
         * The position of the `noscript` fallback.
         * * `body`: end of body
         * * `head`: end of head
         * * `false`: no `noscript`
         * @default 'body'
         */
        noscript?: "body" | "head" | false | undefined;

        /**
         * Whether to add loadCSS if it's not already loaded.
         * @default true
         */
        polyfill?: boolean | undefined;

        /**
         * Paths to use in the `href` tag of the `link` elements.
         * @default false
         */
        replaceStylesheets?: string[] | false | undefined;
    }
}

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 03:09:37 GMT
 * Dependencies: none

# Credits
These definitions were written by [cherryblossom](https://github.com/cherryblossom000).

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