@threadplane/angularInterfacev0.3.7

ThreadDirectoryConfig

Configuration for one injected thread directory view.

import type { ThreadDirectoryConfig } from '@threadplane/angular';

Declaration

export interface ThreadDirectoryConfig<TDirectory extends ThreadDirectory = ThreadDirectory>  {
  readonly createDirectory: (context: ThreadDirectoryContext) => TDirectory;
  readonly getThread?: (threadId: string, directory: TDirectory) => Promise<ThreadEntry | null>;
}

Type parameters

TDirectory
ThreadDirectory Default: ThreadDirectory

Members

createDirectory

Creates the directory. Called once, in the view's injection context, so it may call inject(). The view owns the directory and disposes it.

readonly createDirectory: (context: ThreadDirectoryContext) => TDirectory;

getThread

Reads one thread from the backend: the entry, or null when the backend says there is no such thread. Reject when the backend could not be asked. Used by getThread in place of the directory's own get.

readonly getThread?: (threadId: string, directory: TDirectory) => Promise<ThreadEntry | null>;