config.plistValue
Checks value is Info.plist data; fail reports the key at fault.
Usage
Validate an Info.plist value supplied to a configuration tool.
// Validate an Info.plist value supplied to a configuration tool.
import { plistValue, type PlistDictionary } from 'kuito/config';
const settings: PlistDictionary = { UIFileSharingEnabled: true };
const checked = plistValue(settings, 'ios.infoPlist', (key, message) => {
throw new Error(`${key}: ${message}`);
});
console.log(checked);Signatures
(value: unknown, key: string, fail: (key: string, message: string) => never): PlistValueParameters
| Name | Type | Required | Description |
|---|---|---|---|
value | unknown | Yes | — |
key | string | Yes | — |
fail | (key: string, message: string) => never | Yes | — |
Returns
Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.