Node-Red configuration
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.

no-work-result.d.ts 1.5KB

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