Skip to content

Commit

Permalink
Update dependencies and code style
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Jul 6, 2023
1 parent 8b54e60 commit 431c51b
Show file tree
Hide file tree
Showing 60 changed files with 3,333 additions and 3,306 deletions.
38 changes: 19 additions & 19 deletions lib/at-rule.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@ import Container, { ContainerProps } from './container.js'

declare namespace AtRule {
export interface AtRuleRaws extends Record<string, unknown> {
/**
* The space symbols before the node. It also stores `*`
* and `_` symbols before the declaration (IE hack).
*/
before?: string

/**
* The space symbols after the last child of the node to the end of the node.
*/
Expand All @@ -19,29 +13,35 @@ declare namespace AtRule {
afterName?: string

/**
* The symbols between the last parameter and `{` for rules.
* The space symbols before the node. It also stores `*`
* and `_` symbols before the declaration (IE hack).
*/
between?: string
before?: string

/**
* Contains `true` if the last child has an (optional) semicolon.
* The symbols between the last parameter and `{` for rules.
*/
semicolon?: boolean
between?: string

/**
* The rule’s selector with comments.
*/
params?: {
value: string
raw: string
value: string
}

/**
* Contains `true` if the last child has an (optional) semicolon.
*/
semicolon?: boolean
}

export interface AtRuleProps extends ContainerProps {
/** Name of the at-rule. */
name: string
/** Parameters following the name of the at-rule. */
params?: string | number
params?: number | string
/** Information used to generate byte-to-byte equal node string as it was in the origin input. */
raws?: AtRuleRaws
}
Expand Down Expand Up @@ -76,10 +76,6 @@ declare namespace AtRule {
* ```
*/
declare class AtRule_ extends Container {
type: 'atrule'
parent: Container | undefined
raws: AtRule.AtRuleRaws

/**
* The at-rule’s name immediately follows the `@`.
*
Expand All @@ -90,7 +86,6 @@ declare class AtRule_ extends Container {
* ```
*/
name: string

/**
* The at-rule’s parameters, the values that follow the at-rule’s name
* but precede any `{}` block.
Expand All @@ -102,12 +97,17 @@ declare class AtRule_ extends Container {
* ```
*/
params: string
parent: Container | undefined

raws: AtRule.AtRuleRaws

type: 'atrule'

constructor(defaults?: AtRule.AtRuleProps)
assign(overrides: object | AtRule.AtRuleProps): this
assign(overrides: AtRule.AtRuleProps | object): this
clone(overrides?: Partial<AtRule.AtRuleProps>): this
cloneBefore(overrides?: Partial<AtRule.AtRuleProps>): this
cloneAfter(overrides?: Partial<AtRule.AtRuleProps>): this
cloneBefore(overrides?: Partial<AtRule.AtRuleProps>): this
}

declare class AtRule extends AtRule_ {}
Expand Down
12 changes: 6 additions & 6 deletions lib/comment.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ declare namespace Comment {
}

export interface CommentProps extends NodeProps {
/** Content of the comment. */
text: string
/** Information used to generate byte-to-byte equal node string as it was in the origin input. */
raws?: CommentRaws
/** Content of the comment. */
text: string
}

// eslint-disable-next-line @typescript-eslint/no-use-before-define
Expand All @@ -46,20 +46,20 @@ declare namespace Comment {
* explained above.
*/
declare class Comment_ extends Node {
type: 'comment'
parent: Container | undefined
raws: Comment.CommentRaws

/**
* The comment's text.
*/
text: string

type: 'comment'

constructor(defaults?: Comment.CommentProps)
assign(overrides: object | Comment.CommentProps): this
assign(overrides: Comment.CommentProps | object): this
clone(overrides?: Partial<Comment.CommentProps>): this
cloneBefore(overrides?: Partial<Comment.CommentProps>): this
cloneAfter(overrides?: Partial<Comment.CommentProps>): this
cloneBefore(overrides?: Partial<Comment.CommentProps>): this
}

declare class Comment extends Comment_ {}
Expand Down

0 comments on commit 431c51b

Please sign in to comment.