declaration.d.ts 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import * as postcss from './postcss';
  2. import Node from './node';
  3. export default class Declaration extends Node implements postcss.Declaration {
  4. /**
  5. * Returns a string representing the node's type. Possible values are
  6. * root, atrule, rule, decl or comment.
  7. */
  8. type: string;
  9. /**
  10. * Contains information to generate byte-to-byte equal node string as it
  11. * was in origin input.
  12. */
  13. raws: postcss.DeclarationRaws;
  14. /**
  15. * The declaration's property name.
  16. */
  17. prop: string;
  18. /**
  19. * The declaration's value. This value will be cleaned of comments. If the
  20. * source value contained comments, those comments will be available in the
  21. * _value.raws property. If you have not changed the value, the result of
  22. * decl.toString() will include the original raws value (comments and all).
  23. */
  24. value: string;
  25. /**
  26. * True if the declaration has an !important annotation.
  27. */
  28. important: boolean;
  29. /**
  30. * Represents a CSS declaration.
  31. */
  32. constructor(defaults?: postcss.DeclarationNewProps);
  33. /**
  34. * @param overrides New properties to override in the clone.
  35. * @returns A clone of this node. The node and its (cloned) children will
  36. * have a clean parent and code style properties.
  37. */
  38. clone(overrides?: Object): any;
  39. toJSON(): postcss.JsonDeclaration;
  40. _value: string;
  41. _important: string;
  42. }