@types/css-tree
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -52,4 +52,4 @@ // Type definitions for css-tree 1.0 | ||
prevUntil(start: ListItem<TData>, fn: IteratorFn<TData, boolean>): void; | ||
some<TContext>(fn: IteratorFn<TData, boolean, TContext>, context: TContext): void; | ||
some(fn: IteratorFn<TData, boolean>): void; | ||
some<TContext>(fn: IteratorFn<TData, boolean, TContext>, context: TContext): boolean; | ||
some(fn: IteratorFn<TData, boolean>): boolean; | ||
map<TContext, TResult>(fn: IteratorFn<TData, TResult, TContext>, context: TContext): List<TResult>; | ||
@@ -531,13 +531,68 @@ map<TResult>(fn: IteratorFn<TData, TResult>): List<TResult>; | ||
export type EnterOrLeaveFn = (this: WalkContext, node: CssNode, item: ListItem<CssNode>, list: List<CssNode>) => void; | ||
export type EnterOrLeaveFn<NodeType = CssNode> = (this: WalkContext, node: NodeType, item: ListItem<CssNode>, list: List<CssNode>) => void; | ||
export interface WalkOptions { | ||
export interface WalkOptionsNoVisit { | ||
enter?: EnterOrLeaveFn; | ||
leave?: EnterOrLeaveFn; | ||
visit?: string; | ||
reverse?: boolean; | ||
} | ||
export interface WalkOptionsVisit<NodeType = CssNode, NodeTypeName = string> { | ||
visit: NodeTypeName; | ||
enter?: EnterOrLeaveFn<NodeType>; | ||
leave?: EnterOrLeaveFn<NodeType>; | ||
reverse?: boolean; | ||
} | ||
export type WalkOptions = | ||
WalkOptionsVisit<AnPlusB, 'AnPlusB'> | ||
| WalkOptionsVisit<Atrule, 'Atrule'> | ||
| WalkOptionsVisit<AtrulePrelude, 'AtrulePrelude'> | ||
| WalkOptionsVisit<AttributeSelector, 'AttributeSelector'> | ||
| WalkOptionsVisit<Block, 'Block'> | ||
| WalkOptionsVisit<Brackets, 'Brackets'> | ||
| WalkOptionsVisit<CDC, 'CDC'> | ||
| WalkOptionsVisit<CDO, 'CDO'> | ||
| WalkOptionsVisit<ClassSelector, 'ClassSelector'> | ||
| WalkOptionsVisit<Combinator, 'Combinator'> | ||
| WalkOptionsVisit<Comment, 'Comment'> | ||
| WalkOptionsVisit<Declaration, 'Declaration'> | ||
| WalkOptionsVisit<DeclarationList, 'DeclarationList'> | ||
| WalkOptionsVisit<Dimension, 'Dimension'> | ||
| WalkOptionsVisit<FunctionNode, 'FunctionNode'> | ||
| WalkOptionsVisit<HexColor, 'HexColor'> | ||
| WalkOptionsVisit<IdSelector, 'IdSelector'> | ||
| WalkOptionsVisit<Identifier, 'Identifier'> | ||
| WalkOptionsVisit<MediaFeature, 'MediaFeature'> | ||
| WalkOptionsVisit<MediaQuery, 'MediaQuery'> | ||
| WalkOptionsVisit<MediaQueryList, 'MediaQueryList'> | ||
| WalkOptionsVisit<Nth, 'Nth'> | ||
| WalkOptionsVisit<NumberNode, 'NumberNode'> | ||
| WalkOptionsVisit<Operator, 'Operator'> | ||
| WalkOptionsVisit<Parentheses, 'Parentheses'> | ||
| WalkOptionsVisit<Percentage, 'Percentage'> | ||
| WalkOptionsVisit<PseudoClassSelector, 'PseudoClassSelector'> | ||
| WalkOptionsVisit<PseudoElementSelector, 'PseudoElementSelector'> | ||
| WalkOptionsVisit<Ratio, 'Ratio'> | ||
| WalkOptionsVisit<Raw, 'Raw'> | ||
| WalkOptionsVisit<Rule, 'Rule'> | ||
| WalkOptionsVisit<Selector, 'Selector'> | ||
| WalkOptionsVisit<SelectorList, 'SelectorList'> | ||
| WalkOptionsVisit<StringNode, 'StringNode'> | ||
| WalkOptionsVisit<StyleSheet, 'StyleSheet'> | ||
| WalkOptionsVisit<TypeSelector, 'TypeSelector'> | ||
| WalkOptionsVisit<UnicodeRange, 'UnicodeRange'> | ||
| WalkOptionsVisit<Url, 'Url'> | ||
| WalkOptionsVisit<Value, 'Value'> | ||
| WalkOptionsVisit<WhiteSpace, 'WhiteSpace'> | ||
| WalkOptionsNoVisit; | ||
export function walk(ast: CssNode, options: EnterOrLeaveFn | WalkOptions): void; | ||
export type FindFn = (this: WalkContext, node: CssNode, item: ListItem<CssNode>, list: List<CssNode>) => boolean; | ||
export function find(ast: CssNode, fn: FindFn): CssNode; | ||
export function findLast(ast: CssNode, fn: FindFn): CssNode; | ||
export function findAll(ast: CssNode, fn: FindFn): CssNode[]; | ||
export interface Property { | ||
@@ -544,0 +599,0 @@ readonly basename: string; |
{ | ||
"name": "@types/css-tree", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "TypeScript definitions for css-tree", | ||
@@ -14,3 +14,3 @@ "license": "MIT", | ||
"main": "", | ||
"types": "index", | ||
"types": "index.d.ts", | ||
"repository": { | ||
@@ -23,4 +23,4 @@ "type": "git", | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "c06aef8f7c92188469dc6548c8564faf76d7ac1f9c4059bf5c08aa764dc93ef9", | ||
"typeScriptVersion": "2.7" | ||
"typesPublisherContentHash": "1c85bd0586203624495390d5d8e89afdb70813d58e8198a4cbdc424b0e9ed323", | ||
"typeScriptVersion": "2.8" | ||
} |
@@ -8,6 +8,6 @@ # Installation | ||
# Details | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/css-tree | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/css-tree. | ||
Additional Details | ||
* Last updated: Mon, 29 Jul 2019 17:46:08 GMT | ||
### Additional Details | ||
* Last updated: Wed, 04 Dec 2019 23:54:09 GMT | ||
* Dependencies: none | ||
@@ -17,2 +17,2 @@ * Global values: none | ||
# Credits | ||
These definitions were written by Erik Källén <https://github.com/erik-kallen>. | ||
These definitions were written by Erik Källén (https://github.com/erik-kallen). |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19152
535