css-kits
Version:
Parse css to javascript object. Support change class and id
11 lines (10 loc) • 380 B
TypeScript
import { ParseOptions, StyleSheet } from '../types';
export declare function parse(rawCSS: string, options?: ParseOptions): StyleSheet[];
export type SafeParseReturn = {
success: false;
errorMessage: string;
} | {
success: true;
styleSheetList: StyleSheet[];
};
export declare function safeParse(rawCSS: string, options?: ParseOptions): SafeParseReturn;