Verwendung

Validate an Info.plist value supplied to a configuration tool.

tsx
// 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);

Signaturen

ts
(value: unknown, key: string, fail: (key: string, message: string) => never): PlistValue

Parameter

NameTypErforderlichBeschreibung
valueunknownJa—
keystringJa—
fail(key: string, message: string) => neverJa—

Rückgabe

PlistValue

Generiert aus den öffentlichen TypeScript-Deklarationen: Signaturen, Props und Standardwerte stammen aus der geprüften Quelle, Beschreibungen aus deren JSDoc. Kein Standardwert ist erfunden.