@types/styletron-standard
TypeScript icon, indicating that this package has built-in type declarations

2.0.5 • Public • Published

Installation

npm install --save @types/styletron-standard

Summary

This package contains type definitions for styletron-standard (https://github.com/styletron/styletron).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/styletron-standard.

index.d.ts

import * as CSS from "csstype";

export type Properties = CSS.Properties<string | number>;
export type FontFace = CSS.AtRule.FontFace;
export interface KeyframesPercentageObject {
    [key: string]: Properties;
}

export type KeyframesObject = KeyframesPercentageObject & {
    from?: Properties | undefined;
    to?: Properties | undefined;
};

// Unrecognized properties are assumed to be media queries
// or pseudo selectors w/ nested style objects.
// See: https://github.com/styletron/styletron-standard
export type StyleObject =
    & Properties
    & { [key in string]: Properties[keyof Properties] | StyleObject };

export interface StandardEngine {
    renderStyle(style: StyleObject): string;
    renderKeyframes(keyframes: KeyframesObject): string;
    renderFontFace(fontFace: FontFace): string;
}

export function driver(style: StyleObject, styletron: StandardEngine): string;

export function getInitialStyle(): StyleObject;

export function renderDeclarativeRules(
    style: StyleObject,
    styletrong: StandardEngine,
): StyleObject;

Additional Details

  • Last updated: Tue, 07 Nov 2023 15:11:36 GMT
  • Dependencies: csstype

Credits

These definitions were written by Eric Taylor.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/styletron-standard

Weekly Downloads

14,784

Version

2.0.5

License

MIT

Unpacked Size

4.79 kB

Total Files

5

Last publish

Collaborators

  • types