1 import Processor from './processor';
2 import postcss from './postcss';
3 import Root from './root';
4 export default class Result implements postcss.Result {
6 * The Processor instance used for this transformation.
10 * Contains the Root node after all transformations.
14 * Options from the Processor#process(css, opts) or Root#toResult(opts) call
15 * that produced this Result instance.
17 opts: postcss.ResultOptions;
19 * A CSS string representing this Result's Root instance.
23 * An instance of the SourceMapGenerator class from the source-map library,
24 * representing changes to the Result's Root instance.
25 * This property will have a value only if the user does not want an inline
26 * source map. By default, PostCSS generates inline source maps, written
27 * directly into the processed CSS. The map property will be empty by default.
28 * An external source map will be generated — and assigned to map — only if
29 * the user has set the map.inline option to false, or if PostCSS was passed
30 * an external input source map.
32 map: postcss.ResultMap;
34 * Contains messages from plugins (e.g., warnings or custom messages).
35 * Add a warning using Result#warn() and get all warnings
36 * using the Result#warnings() method.
38 messages: postcss.ResultMessage[];
39 lastPlugin: postcss.Transformer;
41 * Provides the result of the PostCSS transformations.
45 * The Processor instance used for this transformation.
47 processor?: Processor,
49 * Contains the Root node after all transformations.
53 * Options from the Processor#process(css, opts) or Root#toResult(opts) call
54 * that produced this Result instance.
56 opts?: postcss.ResultOptions);
58 * Alias for css property.
62 * Creates an instance of Warning and adds it to messages.
63 * @param message Used in the text property of the message object.
64 * @param options Properties for Message object.
66 warn(message: string, options?: postcss.WarningOptions): void;
68 * @returns Warnings from plugins, filtered from messages.
70 warnings(): postcss.ResultMessage[];
72 * Alias for css property to use with syntaxes that generate non-CSS output.