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

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 1.5 KB
RevLine 
[d565449]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 constructor(processor: Processor, css: string, opts: ResultOptions)
30 async(): Promise<Result<Root>>
31 sync(): Result<Root>
32 toString(): string
33 warnings(): Warning[]
34 get content(): string
35 get css(): string
36 get map(): SourceMap
37 get messages(): Message[]
38 get opts(): ResultOptions
39 get processor(): Processor
40 get root(): Root
41 get [Symbol.toStringTag](): string
42}
43
44declare class NoWorkResult extends NoWorkResult_ {}
45
46export = NoWorkResult
Note: See TracBrowser for help on using the repository browser.