# pick.type()

The `pick.type()`  or `map.pick-type()` function picks the properties with values and/or keys of type.

{% code lineNumbers="true" %}

```scss
// Sass.
@use 'sass:list';
@use 'sass:map';

// Functions.
@use 'pick.key-type.function' as *;
@use 'pick.value-type.function' as *;

// Modules.
@use '../../string';

// The `pick.type()` or `map.pick-type()` function.
@function type($map, $field-type...) {
  $result: ();
  @each $pattern in $field-type {
    @if type-of($pattern) == string {
      @if string.index($pattern, 'value:') or string.index($pattern, 'key:') {
        $pattern: string.split(string.unquote($pattern), ':');
        $type: string.split(list.nth($pattern, 2), ',');
        $result: map.deep-merge(
          $result,
          if(
            list.nth($pattern, 1) == key,
            key-type($map, $type...),
            value-type($map, $type...)
          )
        );
      }
    }
  }
  @return $result;
}
```

{% endcode %}

{% embed url="<https://github.com/angular-package/sass/blob/main/map/pick/_pick.type.function.scss>" %}

### Parameters

#### `$map`

A map from which properties with values and/or keys of a certain type are picked.

#### `$field-type...`

A pattern `field:type` where field can be value or key and type `bool`, `calculation`, `color`, `function`, `list`, `map`, `null`, `number` or `string`, to pick properties with the value and/or key of the specified type.

### Return

The return value is a copy of [`$map`](#usdmap) with values and/or keys associated with types.

## Examples

```scss
// Use.
@use '@angular-package/sass/map';

// Examples.


```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.angular-package.dev/sass/map/pick/pick.type.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
