Files
NativeScript/packages/core/css/reworkcss.d.ts
2022-11-28 14:32:25 -08:00

34 lines
620 B
TypeScript

export interface Position {
start: { line: number; column: number };
end: { line: number; column: number };
}
export interface Node {
type: 'rule' | 'keyframes' | 'declaration' | 'import';
position: Position;
}
export interface Declaration extends Node {
property: string;
value: string;
}
export interface Rule extends Node {
selectors: string[];
declarations: Declaration[];
}
export interface Keyframes extends Rule {
name: string;
}
export interface StyleSheet {
rules: Rule[];
}
export interface SyntaxTree {
stylesheet: StyleSheet;
}
export function parse(css: string, options: any): SyntaxTree;