---
editLink: false
lastUpdated: false
---

[@salesforce/b2c-tooling-sdk](../../modules.md) / [config](../index.md) / parseConfigValue

# Function: parseConfigValue()

> **parseConfigValue**(`key`, `raw`): `unknown`

Defined in: [packages/b2c-tooling-sdk/src/config/config-write.ts:171](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/bceb8da43dd8bc63d57932bbd905d36a1b40c949/packages/b2c-tooling-sdk/src/config/config-write.ts#L171)

Coerce a command-line value to the key's type.

String keys keep the text as given. Other keys accept JSON (`true`,
`["a","b"]`, `{"level":"NO_DELETE"}`); string-list keys also accept a
plain or comma-separated value (`./schemas` becomes `["./schemas"]`).

## Parameters

### key

[`ConfigKey`](../interfaces/ConfigKey.md)

### raw

`string`

## Returns

`unknown`

## Throws

ConfigWriteError when the value doesn't match the key's schema
