1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- import Container, { ContainerProps } from './container.js'
- import Document from './document.js'
- import { ProcessOptions } from './postcss.js'
- import Result from './result.js'
- declare namespace Root {
- export interface RootRaws extends Record<string, any> {
-
- after?: string
-
- codeAfter?: string
-
- codeBefore?: string
-
- semicolon?: boolean
- }
- export interface RootProps extends ContainerProps {
-
- raws?: RootRaws
- }
-
- export { Root_ as default }
- }
- declare class Root_ extends Container {
- parent: Document | undefined
- raws: Root.RootRaws
- type: 'root'
- constructor(defaults?: Root.RootProps)
- assign(overrides: object | Root.RootProps): this
- clone(overrides?: Partial<Root.RootProps>): Root
- cloneAfter(overrides?: Partial<Root.RootProps>): Root
- cloneBefore(overrides?: Partial<Root.RootProps>): Root
- /**
- * Returns a `Result` instance representing the root’s CSS.
- *
- * ```js
- * const root1 = postcss.parse(css1, { from: 'a.css' })
- * const root2 = postcss.parse(css2, { from: 'b.css' })
- * root1.append(root2)
- * const result = root1.toResult({ to: 'all.css', map: true })
- * ```
- *
- * @param opts Options.
- * @return Result with current root’s CSS.
- */
- toResult(options?: ProcessOptions): Result
- }
- declare class Root extends Root_ {}
- export = Root
|