Json
What crosses the host boundary as data: JSON values, checked again at run time.
Verwendung
Type plain data passed to native code.
// Type plain data passed to native code.
import { defineModule, fn, type Json } from 'kuito';
// modules/analytics/analytics.ts: an event's properties cross as JSON,
// checked again on the native side.
export default defineModule('Analytics', {
track: fn.background<(name: string, properties: Json) => Promise<void>>(),
ios: { class: 'AnalyticsModule' },
android: { class: 'com.example.myapp.modules.analytics.AnalyticsModule' },
});Typdeklaration
export type Json =
| string
| number
| boolean
| null
| readonly Json[]
| { readonly [key: string]: Json };Typ
string | number | boolean | readonly Json[] | { readonly [key: string]: Json;}Generiert aus den öffentlichen TypeScript-Deklarationen: Signaturen, Props und Standardwerte stammen aus der geprüften Quelle, Beschreibungen aus deren JSDoc. Kein Standardwert ist erfunden.