Utilisation

Validate a configuration in an app-development tool.

Ce type est utilisé par config.resolveConfig

tsx
// Validate a configuration in an app-development tool.
import { resolveConfig, SETTING_DEFAULTS, IOS_BACKGROUND_MODES } from 'kuito/config';

const config = resolveConfig(
  {
    name: 'Notes',
    ios: { bundleIdentifier: 'com.example.notes' },
    android: { applicationId: 'com.example.notes' },
    environments: { staging: { idSuffix: '.staging' } },
  },
  '/project/kuito.config.ts',
  'staging',
);
console.log(config.ios.bundleIdentifier, config.splash, config.icon);
console.log(SETTING_DEFAULTS.minSdk, IOS_BACKGROUND_MODES);

Déclaration du type

ts
export interface KuitoPermissions {
  camera?: string;
  microphone?: string;
  photos?: string;
  /** Foreground ("when in use") location. */
  location?: string;
  /** Location in the background too ("always"); needs `location` (docs/location.md). */
  locationAlways?: string;
  /** Face ID, for SecureStore's requireAuthentication (docs/secure-store.md). */
  biometrics?: string;
  /** Neither platform shows a reason for notifications. */
  notifications?: true;
}

Membres 7

NomTypeRequisDescription
camerastringNon—
microphonestringNon—
photosstringNon—
locationstringNonForeground ("when in use") location.
locationAlwaysstringNonLocation in the background too ("always"); needs location (docs/location.md).
biometricsstringNonFace ID, for SecureStore's requireAuthentication (docs/secure-store.md).
notificationstrueNonNeither platform shows a reason for notifications.
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.