Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/css-tree

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/css-tree - npm Package Compare versions

Comparing version 2.3.1 to 2.3.2

193

css-tree/index.d.ts

@@ -13,3 +13,3 @@ // Type definitions for css-tree 2.3

line: number;
column: number
column: number;
};

@@ -19,3 +19,3 @@ end: {

line: number;
column: number
column: number;
};

@@ -30,4 +30,14 @@ }

export type IteratorFn<TData, TResult, TContext = List<TData>> = (this: TContext, item: TData, node: ListItem<TData>, list: List<TData>) => TResult;
export type FilterFn<TData, TResult extends TData, TContext = List<TData>> = (this: TContext, item: TData, node: ListItem<TData>, list: List<TData>) => item is TResult;
export type IteratorFn<TData, TResult, TContext = List<TData>> = (
this: TContext,
item: TData,
node: ListItem<TData>,
list: List<TData>,
) => TResult;
export type FilterFn<TData, TResult extends TData, TContext = List<TData>> = (
this: TContext,
item: TData,
node: ListItem<TData>,
list: List<TData>,
) => item is TResult;
export type ReduceFn<TData, TValue, TContext = List<TData>> = (this: TContext, accum: TValue, data: TData) => TValue;

@@ -39,4 +49,4 @@

get isEmpty(): boolean;
get first(): TData|null;
get last(): TData|null;
get first(): TData | null;
get last(): TData | null;
[Symbol.iterator](): IterableIterator<TData>;

@@ -57,3 +67,7 @@ fromArray(array: TData[]): List<TData>;

reduce<TValue>(fn: ReduceFn<TData, TValue>, initialValue: TValue): TValue;
reduceRight<TValue, TContext>(fn: ReduceFn<TData, TValue, TContext>, initialValue: TValue, context: TContext): TValue;
reduceRight<TValue, TContext>(
fn: ReduceFn<TData, TValue, TContext>,
initialValue: TValue,
context: TContext,
): TValue;
reduceRight<TValue>(fn: ReduceFn<TData, TValue>, initialValue: TValue): TValue;

@@ -93,3 +107,3 @@ some<TContext>(fn: IteratorFn<TData, boolean, TContext>, context: TContext): boolean;

export interface AnPlusB extends CssNodeCommon {
type: 'AnPlusB';
type: "AnPlusB";
a: string | null;

@@ -100,3 +114,3 @@ b: string | null;

export interface Atrule extends CssNodeCommon {
type: 'Atrule';
type: "Atrule";
name: string;

@@ -108,3 +122,3 @@ prelude: AtrulePrelude | Raw | null;

export interface AtrulePlain extends CssNodeCommon {
type: 'Atrule';
type: "Atrule";
name: string;

@@ -116,3 +130,3 @@ prelude: AtrulePreludePlain | Raw | null;

export interface AtrulePrelude extends CssNodeCommon {
type: 'AtrulePrelude';
type: "AtrulePrelude";
children: List<CssNode>;

@@ -122,3 +136,3 @@ }

export interface AtrulePreludePlain extends CssNodeCommon {
type: 'AtrulePrelude';
type: "AtrulePrelude";
children: CssNodePlain[];

@@ -128,3 +142,3 @@ }

export interface AttributeSelector extends CssNodeCommon {
type: 'AttributeSelector';
type: "AttributeSelector";
name: Identifier;

@@ -137,3 +151,3 @@ matcher: string | null;

export interface Block extends CssNodeCommon {
type: 'Block';
type: "Block";
children: List<CssNode>;

@@ -143,3 +157,3 @@ }

export interface BlockPlain extends CssNodeCommon {
type: 'Block';
type: "Block";
children: CssNodePlain[];

@@ -149,3 +163,3 @@ }

export interface Brackets extends CssNodeCommon {
type: 'Brackets';
type: "Brackets";
children: List<CssNode>;

@@ -155,3 +169,3 @@ }

export interface BracketsPlain extends CssNodeCommon {
type: 'Brackets';
type: "Brackets";
children: CssNodePlain[];

@@ -161,11 +175,11 @@ }

export interface CDC extends CssNodeCommon {
type: 'CDC';
type: "CDC";
}
export interface CDO extends CssNodeCommon {
type: 'CDO';
type: "CDO";
}
export interface ClassSelector extends CssNodeCommon {
type: 'ClassSelector';
type: "ClassSelector";
name: string;

@@ -175,3 +189,3 @@ }

export interface Combinator extends CssNodeCommon {
type: 'Combinator';
type: "Combinator";
name: string;

@@ -181,3 +195,3 @@ }

export interface Comment extends CssNodeCommon {
type: 'Comment';
type: "Comment";
value: string;

@@ -187,3 +201,3 @@ }

export interface Declaration extends CssNodeCommon {
type: 'Declaration';
type: "Declaration";
important: boolean | string;

@@ -195,3 +209,3 @@ property: string;

export interface DeclarationPlain extends CssNodeCommon {
type: 'Declaration';
type: "Declaration";
important: boolean | string;

@@ -203,3 +217,3 @@ property: string;

export interface DeclarationList extends CssNodeCommon {
type: 'DeclarationList';
type: "DeclarationList";
children: List<CssNode>;

@@ -209,3 +223,3 @@ }

export interface DeclarationListPlain extends CssNodeCommon {
type: 'DeclarationList';
type: "DeclarationList";
children: CssNodePlain[];

@@ -215,3 +229,3 @@ }

export interface Dimension extends CssNodeCommon {
type: 'Dimension';
type: "Dimension";
value: string;

@@ -222,3 +236,3 @@ unit: string;

export interface FunctionNode extends CssNodeCommon {
type: 'Function';
type: "Function";
name: string;

@@ -229,3 +243,3 @@ children: List<CssNode>;

export interface FunctionNodePlain extends CssNodeCommon {
type: 'Function';
type: "Function";
name: string;

@@ -236,3 +250,3 @@ children: CssNodePlain[];

export interface Hash extends CssNodeCommon {
type: 'Hash';
type: "Hash";
value: string;

@@ -242,3 +256,3 @@ }

export interface IdSelector extends CssNodeCommon {
type: 'IdSelector';
type: "IdSelector";
name: string;

@@ -248,3 +262,3 @@ }

export interface Identifier extends CssNodeCommon {
type: 'Identifier';
type: "Identifier";
name: string;

@@ -254,3 +268,3 @@ }

export interface MediaFeature extends CssNodeCommon {
type: 'MediaFeature';
type: "MediaFeature";
name: string;

@@ -261,3 +275,3 @@ value: Identifier | NumberNode | Dimension | Ratio | null;

export interface MediaQuery extends CssNodeCommon {
type: 'MediaQuery';
type: "MediaQuery";
children: List<CssNode>;

@@ -267,3 +281,3 @@ }

export interface MediaQueryPlain extends CssNodeCommon {
type: 'MediaQuery';
type: "MediaQuery";
children: CssNodePlain[];

@@ -273,3 +287,3 @@ }

export interface MediaQueryList extends CssNodeCommon {
type: 'MediaQueryList';
type: "MediaQueryList";
children: List<CssNode>;

@@ -279,3 +293,3 @@ }

export interface MediaQueryListPlain extends CssNodeCommon {
type: 'MediaQueryList';
type: "MediaQueryList";
children: CssNodePlain[];

@@ -285,3 +299,3 @@ }

export interface Nth extends CssNodeCommon {
type: 'Nth';
type: "Nth";
nth: AnPlusB | Identifier;

@@ -292,3 +306,3 @@ selector: SelectorList | null;

export interface NthPlain extends CssNodeCommon {
type: 'Nth';
type: "Nth";
nth: AnPlusB | Identifier;

@@ -299,3 +313,3 @@ selector: SelectorListPlain | null;

export interface NumberNode extends CssNodeCommon {
type: 'Number';
type: "Number";
value: string;

@@ -305,3 +319,3 @@ }

export interface Operator extends CssNodeCommon {
type: 'Operator';
type: "Operator";
value: string;

@@ -311,3 +325,3 @@ }

export interface Parentheses extends CssNodeCommon {
type: 'Parentheses';
type: "Parentheses";
children: List<CssNode>;

@@ -317,3 +331,3 @@ }

export interface ParenthesesPlain extends CssNodeCommon {
type: 'Parentheses';
type: "Parentheses";
children: CssNodePlain[];

@@ -323,3 +337,3 @@ }

export interface Percentage extends CssNodeCommon {
type: 'Percentage';
type: "Percentage";
value: string;

@@ -329,3 +343,3 @@ }

export interface PseudoClassSelector extends CssNodeCommon {
type: 'PseudoClassSelector';
type: "PseudoClassSelector";
name: string;

@@ -336,3 +350,3 @@ children: List<CssNode> | null;

export interface PseudoClassSelectorPlain extends CssNodeCommon {
type: 'PseudoClassSelector';
type: "PseudoClassSelector";
name: string;

@@ -343,3 +357,3 @@ children: CssNodePlain[] | null;

export interface PseudoElementSelector extends CssNodeCommon {
type: 'PseudoElementSelector';
type: "PseudoElementSelector";
name: string;

@@ -350,3 +364,3 @@ children: List<CssNode> | null;

export interface PseudoElementSelectorPlain extends CssNodeCommon {
type: 'PseudoElementSelector';
type: "PseudoElementSelector";
name: string;

@@ -357,3 +371,3 @@ children: CssNodePlain[] | null;

export interface Ratio extends CssNodeCommon {
type: 'Ratio';
type: "Ratio";
left: string;

@@ -364,3 +378,3 @@ right: string;

export interface Raw extends CssNodeCommon {
type: 'Raw';
type: "Raw";
value: string;

@@ -370,3 +384,3 @@ }

export interface Rule extends CssNodeCommon {
type: 'Rule';
type: "Rule";
prelude: SelectorList | Raw;

@@ -377,3 +391,3 @@ block: Block;

export interface RulePlain extends CssNodeCommon {
type: 'Rule';
type: "Rule";
prelude: SelectorListPlain | Raw;

@@ -384,3 +398,3 @@ block: BlockPlain;

export interface Selector extends CssNodeCommon {
type: 'Selector';
type: "Selector";
children: List<CssNode>;

@@ -390,3 +404,3 @@ }

export interface SelectorPlain extends CssNodeCommon {
type: 'Selector';
type: "Selector";
children: CssNodePlain[];

@@ -396,3 +410,3 @@ }

export interface SelectorList extends CssNodeCommon {
type: 'SelectorList';
type: "SelectorList";
children: List<CssNode>;

@@ -402,3 +416,3 @@ }

export interface SelectorListPlain extends CssNodeCommon {
type: 'SelectorList';
type: "SelectorList";
children: CssNodePlain[];

@@ -408,3 +422,3 @@ }

export interface StringNode extends CssNodeCommon {
type: 'String';
type: "String";
value: string;

@@ -414,3 +428,3 @@ }

export interface StyleSheet extends CssNodeCommon {
type: 'StyleSheet';
type: "StyleSheet";
children: List<CssNode>;

@@ -420,3 +434,3 @@ }

export interface StyleSheetPlain extends CssNodeCommon {
type: 'StyleSheet';
type: "StyleSheet";
children: CssNodePlain[];

@@ -426,3 +440,3 @@ }

export interface TypeSelector extends CssNodeCommon {
type: 'TypeSelector';
type: "TypeSelector";
name: string;

@@ -432,3 +446,3 @@ }

export interface UnicodeRange extends CssNodeCommon {
type: 'UnicodeRange';
type: "UnicodeRange";
value: string;

@@ -438,3 +452,3 @@ }

export interface Url extends CssNodeCommon {
type: 'Url';
type: "Url";
value: string;

@@ -444,3 +458,3 @@ }

export interface Value extends CssNodeCommon {
type: 'Value';
type: "Value";
children: List<CssNode>;

@@ -450,3 +464,3 @@ }

export interface ValuePlain extends CssNodeCommon {
type: 'Value';
type: "Value";
children: CssNodePlain[];

@@ -456,3 +470,3 @@ }

export interface WhiteSpace extends CssNodeCommon {
type: 'WhiteSpace';
type: "WhiteSpace";
value: string;

@@ -462,3 +476,3 @@ }

export type CssNode =
AnPlusB
| AnPlusB
| Atrule

@@ -505,3 +519,3 @@ | AtrulePrelude

export type CssNodePlain =
AnPlusB
| AnPlusB
| AtrulePlain

@@ -597,3 +611,8 @@ | AtrulePreludePlain

export type EnterOrLeaveFn<NodeType = CssNode> = (this: WalkContext, node: NodeType, item: ListItem<CssNode>, list: List<CssNode>) => void;
export type EnterOrLeaveFn<NodeType = CssNode> = (
this: WalkContext,
node: NodeType,
item: ListItem<CssNode>,
list: List<CssNode>,
) => void;

@@ -607,3 +626,3 @@ export interface WalkOptionsNoVisit {

export interface WalkOptionsVisit<NodeType extends CssNode = CssNode> {
visit: NodeType['type'];
visit: NodeType["type"];
enter?: EnterOrLeaveFn<NodeType> | undefined;

@@ -615,3 +634,3 @@ leave?: EnterOrLeaveFn<NodeType> | undefined;

export type WalkOptions =
WalkOptionsVisit<AnPlusB>
| WalkOptionsVisit<AnPlusB>
| WalkOptionsVisit<Atrule>

@@ -696,3 +715,3 @@ | WalkOptionsVisit<AtrulePrelude>

export interface DSNodeAtWord {
type: 'AtKeyword';
type: "AtKeyword";
name: string;

@@ -705,3 +724,3 @@ }

export interface DSNodeComma {
type: 'Comma';
type: "Comma";
}

@@ -713,7 +732,7 @@

export interface DSNodeFunction {
type: 'Function';
type: "Function";
name: string;
}
export type DSNodeCombinator = '|' | '||' | '&&' | ' ';
export type DSNodeCombinator = "|" | "||" | "&&" | " ";

@@ -724,3 +743,3 @@ /**

export interface DSNodeGroup {
type: 'Group';
type: "Group";
terms: DSNode[];

@@ -736,3 +755,3 @@ combinator: DSNodeCombinator;

export interface DSNodeKeyword {
type: 'Keyword';
type: "Keyword";
name: string;

@@ -745,3 +764,3 @@ }

export interface DSNodeMultiplier {
type: 'Multiplier';
type: "Multiplier";
comma: boolean;

@@ -757,3 +776,3 @@ min: number;

export interface DSNodeProperty {
type: 'Property';
type: "Property";
name: string;

@@ -766,3 +785,3 @@ }

export interface DSNodeString {
type: 'String';
type: "String";
value: string;

@@ -775,3 +794,3 @@ }

export interface DSNodeToken {
type: 'Token';
type: "Token";
value: string;

@@ -784,3 +803,3 @@ }

export interface DSNodeTypeOpts {
type: 'Range';
type: "Range";
min: number | null;

@@ -794,3 +813,3 @@ max: number | null;

export interface DSNodeType {
type: 'Type';
type: "Type";
name: string;

@@ -804,3 +823,3 @@ opts: DSNodeTypeOpts | null;

export type DSNode =
DSNodeAtWord
| DSNodeAtWord
| DSNodeComma

@@ -820,3 +839,3 @@ | DSNodeFunction

export type DSNodeMultiplied =
DSNodeFunction
| DSNodeFunction
| DSNodeGroup

@@ -947,5 +966,5 @@ | DSNodeKeyword

export function fork(extension: {
atrules?: Record<string, string> | undefined,
properties?: Record<string, string> | undefined,
types?: Record<string, string> | undefined,
atrules?: Record<string, string> | undefined;
properties?: Record<string, string> | undefined;
types?: Record<string, string> | undefined;
}): { lexer: Lexer };
{
"name": "@types/css-tree",
"version": "2.3.1",
"version": "2.3.2",
"description": "TypeScript definitions for css-tree",

@@ -28,4 +28,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/css-tree",

"dependencies": {},
"typesPublisherContentHash": "0e7c85009c737a65fc999422cee0b79cf38082125b3c57efa3dd2f64fb1db878",
"typeScriptVersion": "4.2"
"typesPublisherContentHash": "d859cd48f24ce7bf37b5fb26109c518b83259448e32308128d7f079eaa991836",
"typeScriptVersion": "4.3"
}

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Tue, 21 Feb 2023 01:32:40 GMT
* Last updated: Mon, 04 Sep 2023 15:41:30 GMT
* Dependencies: none

@@ -14,0 +14,0 @@ * Global values: none

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc