Options
All
  • Public
  • Public/Protected
  • All
Menu

A Promise proxy for the result of PostCSS transformations. This lazy result instance doesn't parse css unless NoWorkResult#root or Result#root are accessed. See the example below for details. A NoWork instance is returned by Processor#process ONLY when no plugins defined.

const noWorkResult = postcss().process(css) // No plugins are defined.
// CSS is not parsed
let root = noWorkResult.root // now css is parsed because we accessed the root

Hierarchy

  • NoWorkResult_

Implements

Index

Constructors

Properties

catch: <TResult>(onrejected?: null | ((reason: any) => TResult | PromiseLike<TResult>)) => Promise<Result_<Root_> | TResult>

Type declaration

    • <TResult>(onrejected?: null | ((reason: any) => TResult | PromiseLike<TResult>)): Promise<Result_<Root_> | TResult>
    • Attaches a callback for only the rejection of the Promise.

      Type parameters

      • TResult = never

      Parameters

      • Optional onrejected: null | ((reason: any) => TResult | PromiseLike<TResult>)

        The callback to execute when the Promise is rejected.

      Returns Promise<Result_<Root_> | TResult>

      A Promise for the completion of the callback.

finally: (onfinally?: null | (() => void)) => Promise<Result_<Root_>>

Type declaration

    • Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The resolved value cannot be modified from the callback.

      Parameters

      • Optional onfinally: null | (() => void)

        The callback to execute when the Promise is settled (fulfilled or rejected).

      Returns Promise<Result_<Root_>>

      A Promise for the completion of the callback.

then: <TResult1, TResult2>(onfulfilled?: null | ((value: Result_<Root_>) => TResult1 | PromiseLike<TResult1>), onrejected?: null | ((reason: any) => TResult2 | PromiseLike<TResult2>)) => Promise<TResult1 | TResult2>

Type declaration

    • <TResult1, TResult2>(onfulfilled?: null | ((value: Result_<Root_>) => TResult1 | PromiseLike<TResult1>), onrejected?: null | ((reason: any) => TResult2 | PromiseLike<TResult2>)): Promise<TResult1 | TResult2>
    • Attaches callbacks for the resolution and/or rejection of the Promise.

      Type parameters

      Parameters

      • Optional onfulfilled: null | ((value: Result_<Root_>) => TResult1 | PromiseLike<TResult1>)

        The callback to execute when the Promise is resolved.

      • Optional onrejected: null | ((reason: any) => TResult2 | PromiseLike<TResult2>)

        The callback to execute when the Promise is rejected.

      Returns Promise<TResult1 | TResult2>

      A Promise for the completion of which ever callback is executed.

Accessors

  • get [toStringTag](): string
  • Returns string

  • get content(): string
  • Returns string

  • get css(): string
  • Returns string

  • Returns SourceMap

  • Returns Message[]

  • Returns ResultOptions

  • Returns Processor_

  • Returns Root_

Methods

  • Returns Promise<Result_<Root_>>

  • Returns Result_<Root_>

  • toString(): string
  • Returns string

  • Returns Warning_[]