数通智联化工云平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
1.7 KiB

2 years ago
import Container from './container.js'
import Node, { NodeProps } from './node.js'
declare namespace Comment {
export interface CommentRaws extends Record<string, unknown> {
/**
* The space symbols before the node.
*/
before?: string
/**
* The space symbols between `/*` and the comments text.
*/
left?: string
/**
* The space symbols between the comments text.
*/
right?: string
}
export interface CommentProps extends NodeProps {
/** Information used to generate byte-to-byte equal node string as it was in the origin input. */
raws?: CommentRaws
2 years ago
/** Content of the comment. */
text: string
2 years ago
}
// eslint-disable-next-line @typescript-eslint/no-use-before-define
export { Comment_ as default }
}
/**
2 years ago
* It represents a class that handles
* [CSS comments](https://developer.mozilla.org/en-US/docs/Web/CSS/Comments)
2 years ago
*
* ```js
* Once (root, { Comment }) {
2 years ago
* const note = new Comment({ text: 'Note: …' })
2 years ago
* root.append(note)
* }
* ```
*
2 years ago
* Remember that CSS comments inside selectors, at-rule parameters,
* or declaration values will be stored in the `raws` properties
* explained above.
2 years ago
*/
declare class Comment_ extends Node {
parent: Container | undefined
raws: Comment.CommentRaws
/**
* The comment's text.
*/
text: string
2 years ago
type: 'comment'
2 years ago
constructor(defaults?: Comment.CommentProps)
2 years ago
assign(overrides: Comment.CommentProps | object): this
clone(overrides?: Partial<Comment.CommentProps>): Comment
cloneAfter(overrides?: Partial<Comment.CommentProps>): Comment
cloneBefore(overrides?: Partial<Comment.CommentProps>): Comment
2 years ago
}
declare class Comment extends Comment_ {}
export = Comment