source: node_modules/postcss/lib/no-work-result.d.ts@ 2058e5c

Last change on this file since 2058e5c was 2058e5c, checked in by istevanoska <ilinastevanoska@…>, 6 months ago

Working / before login

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