Usage

Connect a reporting service

This type is used by fn

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

ts
export interface QueuedDeclaration {
  /** Runs on its thread and returns its result; JavaScript gets a Promise of it. */
  <F extends AsyncFunction>(): F;
  /** Starts on its thread and settles a `KuitoPromise` once, from any thread: a callback API. */
  callback<F extends AsyncFunction>(): F;
}

Members 1

NameTypeRequiredDescription
callback<F extends AsyncFunction>() => FYesStarts on its thread and settles a KuitoPromise once, from any thread: a callback API.
callback — method signatures

Signatures

ts
<F extends AsyncFunction>(): F

Type parameters

NameConstraintDefault
FAsyncFunction—

Parameters

No parameters.

Returns

F

Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.