---
schema_version: "1"
id: 6e60b3e8a8d94130e8210cff79ab3c41171635e15e0fab7ffe9c9fd0bb296d3e
title: literalValueOf
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/latest/dw-types-functions-literalvalueof.md
canonical_url: https://docs.mulesoft.com/dataweave/latest/dw-types-functions-literalvalueof
source_site: docs.mulesoft.com
content_type: documentation
content_hash: b681a31f1b1aa0cac27d998fabeb9bd468c27e31b04360351fd7d25004b7ef40
description: MuleSoft Documentation Site
release: "2.13"
latest: true
---
---
product: DataWeave
version: 2.13
is-latest-version: true
---

# literalValueOf

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

## literalValueOf(t: Type): String | Number | Boolean

Returns the value of an input belongs to the Literal type.

_Introduced in DataWeave version 2.3.0._

### Parameters

<table><colgroup><col> <col></colgroup><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><p><code>t</code></p></td><td><p>The type to check.</p></td></tr></tbody></table>

### Example

This example shows how `literalValueOf` behaves with different inputs.

#### Source

```DataWeave
%dw 2.0
import * from dw::core::Types
type AType = "Mariano"
output application/json
---
{
   a: literalValueOf(AType)
}
```

#### Output

```Json
{
  "a": "Mariano"
}
```
