source: frontend/node_modules/postcss/lib/no-work-result.d.ts

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 1.5 KB
Line 
1import LazyResult from './lazy-result.js'
2import { SourceMap } from './postcss.js'
3import Processor from './processor.js'
4import Result, { Message, ResultOptions } from './result.js'
5import Root from './root.js'
6import Warning from './warning.js'
7
8declare namespace NoWorkResult {
9 export { NoWorkResult_ as default }
10}
11
12/**
13 * A Promise proxy for the result of PostCSS transformations.
14 * This lazy result instance doesn't parse css unless `NoWorkResult#root` or `Result#root`
15 * are accessed. See the example below for details.
16 * A `NoWork` instance is returned by `Processor#process` ONLY when no plugins defined.
17 *
18 * ```js
19 * const noWorkResult = postcss().process(css) // No plugins are defined.
20 * // CSS is not parsed
21 * let root = noWorkResult.root // now css is parsed because we accessed the root
22 * ```
23 */
24declare class NoWorkResult_ implements LazyResult<Root> {
25 catch: Promise<Result<Root>>['catch']
26 finally: Promise<Result<Root>>['finally']
27 then: Promise<Result<Root>>['then']
28 get content(): string
29 get css(): string
30 get map(): SourceMap
31 get messages(): Message[]
32 get opts(): ResultOptions
33 get processor(): Processor
34 get root(): Root
35 get [Symbol.toStringTag](): string
36 constructor(processor: Processor, css: string, opts: ResultOptions)
37 async(): Promise<Result<Root>>
38 sync(): Result<Root>
39 toString(): string
40 warnings(): Warning[]
41}
42
43declare class NoWorkResult extends NoWorkResult_ {}
44
45export = NoWorkResult
Note: See TracBrowser for help on using the repository browser.