# @types/prefixfree

> TypeScript definitions for prefixfree

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

## Install

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

## 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 | 1.0.4 |
| Published | 2023-11-07 |
| First published | 2019-03-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51442 |
| Maintainers | types |

## Links

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

## Recent versions

- 1.0.4 (latest) — 2023-11-07
- 1.0.2 (ts3.6) — 2021-07-08
- 1.0.1 (ts3.0) — 2020-05-15
- 1.0.0 (ts2.8) — 2019-03-25
- 1.0.3 — 2023-10-18

## README

# Installation
> `npm install --save @types/prefixfree`

# Summary
This package contains type definitions for prefixfree (https://github.com/LeaVerou/prefixfree).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/prefixfree.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/prefixfree/index.d.ts)
````ts
declare namespace StyleFix {
    type StyleFixer = (css: string, raw: boolean, element: Element) => string;
}

interface StyleFix {
    fix: StyleFix.StyleFixer;
    fixers?: StyleFix.StyleFixer[] | undefined;
    optIn: boolean;
    camelCase(str: string): string;
    deCamelCase(str: string): string;
    link(link: HTMLLinkElement): void;
    process(): void;
    register(fixer: StyleFix.StyleFixer, index?: number): void;
    styleAttribute(element: ElementCSSInlineStyle): void;
    styleElement(style: HTMLStyleElement): void;
}

declare const StyleFix: StyleFix;

// PrefixFree
declare namespace PrefixFree {
    /** The known prefixes used for CSS properties. */
    type KnownPrefixCSS = "-moz-" | "-ms-" | "-o-" | "-webkit-";

    /** The known prefixes used for CSS properties in `CSSStyleDeclaration`. */
    type KnownPrefixJS = "Moz" | "Ms" | "O" | "Webkit";
}

interface PrefixFree {
    /**
     * The prefix used for CSS properties.
     *
     * Eg.: `-moz-`, `-ms-`, `-o-` or `-webkit-`.
     */
    prefix: PrefixFree.KnownPrefixCSS | string;

    /**
     * The prefix used for CSS properties in `CSSStyleDeclaration`.
     *
     * Eg.: `Moz`, `Ms`, `O` or `Webkit`.
     */
    Prefix: PrefixFree.KnownPrefixJS | string;

    atrules: string[];
    functions: string[];
    keywords: string[];
    properties: string[];
    selectorMap: {
        [selector: string]: string;
    };
    selectors: string[];
    valueProperties: string[];

    prefixCSS: StyleFix.StyleFixer;
    prefixProperty(property: string, camelCase?: boolean): string;
    prefixSelector(selector: string): string;
    property(property: string): string;
    value(value: string, property?: string): string;
}

declare const PrefixFree: PrefixFree;

interface Window {
    StyleFix: StyleFix;
    PrefixFree: PrefixFree;
}

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: none

# Credits
These definitions were written by [ExE Boss](https://github.com/ExE-Boss).

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