Utilização

Connect a reporting service

Este tipo é usado por 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' },
});

Declaração do tipo

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

Membros 1

NomeTipoObrigatórioDescrição
callback<F extends AsyncFunction>() => FSimStarts on its thread and settles a KuitoPromise once, from any thread: a callback API.
callback — assinaturas de método

Assinaturas

ts
<F extends AsyncFunction>(): F

Parâmetros de tipo

NomeRestriçãoPredefinição
FAsyncFunction—

Parâmetros

Sem parâmetros.

Devolve

F

Gerado a partir das declarações TypeScript públicas: assinaturas, props e predefinições vêm da fonte verificada, as descrições da sua JSDoc. Nenhuma predefinição é inventada.