ModuleOf
The module's functions, as an app imports them.
Usage
Connect a reporting service
This type is used by defineModule
// modules/crash-service/crash-service.ts
import { defineModule, fn } from 'kuito';
export default defineModule('CrashService', {
start: fn.main<(key: string) => Promise<void>>(),
ios: { class: 'CrashServiceModule' },
android: { class: 'com.example.myapp.modules.crashservice.CrashServiceModule' },
});Type declaration
export type ModuleOf<S> = { readonly [K in Exclude<keyof S, NeedKey>]: S[K] };Type
{ readonly [K in Exclude<keyof S, keyof NativeNeeds>]: S[K]; }Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.