#
whycq
2024-07-16 806007c405aad9c6caa0e9ca31f4e460edb47c53
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import {OrderedMap} from 'immutable';
 
import {SassList} from './list';
import {Value} from './index';
 
/**
 * Sass's [map type](https://sass-lang.com/documentation/values/maps).
 *
 * @category Custom Function
 */
export class SassMap extends Value {
  /**
   * Creates a new map.
   *
   * @param contents - The contents of the map. This is an immutable
   * `OrderedMap` from the [`immutable` package](https://immutable-js.com/).
   * Defaults to an empty map.
   */
  constructor(contents?: OrderedMap<Value, Value>);
 
  /**
   * Returns the contents of this map as an immutable {@link OrderedMap} from the
   * [`immutable` package](https://immutable-js.com/).
   */
  get contents(): OrderedMap<Value, Value>;
 
  /**
   * Returns the value associated with `key` in this map, or `undefined` if
   * `key` isn't in the map.
   *
   * This is a shorthand for `this.contents.get(key)`, although it may be more
   * efficient in some cases.
   */
  get(key: Value): Value | undefined;
 
  /** Inherited from {@link Value.get}. */
  get(index: number): SassList | undefined;
 
  /** @hidden */
  tryMap(): SassMap;
}