Files
webstudio/@types/css-tree.d.ts
T
Ivan Starkov b39e6a6376 Fix switch display (#569)
Switching display from flex on block caused error in input field

We were not able to parse display block etc

As this is not fixed for display props.
```
setProperty should be called with a style object, string is deprecated
```

So we got that "parsed not valid behavior" which we decided to be
invalid.
2022-12-08 12:07:05 +04:00

40 lines
850 B
TypeScript

declare module "css-tree" {
export function parse(
text: string,
options?: import("@types/css-tree").ParseOptions
): import("@types/css-tree").CssNode;
type Match =
| {
syntax: { type: "Property"; name: string };
match: Match[];
}
| {
syntax: { type: "Type"; name: string };
match: Match[];
}
| {
syntax: { type: "Keyword"; name: string };
token: string;
}
| { syntax: null };
type MatchProperty =
| {
matched: null;
error: { message: string };
}
// eslint-disable-next-line @typescript-eslint/ban-types
| {
matched: Match;
error: null;
};
export declare const lexer: {
matchProperty: (
property: string,
ast: import("@types/css-tree").CssNode
) => MatchProperty;
};
}