Utilisation

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

Signatures

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

Paramètres

NomTypeRequisDescription
valueunknownOui—
keystringOui—
fail(key: string, message: string) => neverOui—

Retourne

PlistValue

Généré depuis les déclarations TypeScript publiques : signatures, props et valeurs par défaut viennent de la source vérifiée, les descriptions de sa JSDoc. Aucune valeur par défaut n'est inventée.