Skip to content

Commit

Permalink
docs: add some other missing docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Im-Beast committed Jun 9, 2023
1 parent c31f4ea commit 626bced
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export interface ComponentOptions {
view?: View | undefined | Signal<View | undefined>;
}

/** Type defining last interaction component experienced */
export interface Interaction {
time: number;
method: "keyboard" | "mouse" | undefined;
Expand Down
16 changes: 16 additions & 0 deletions src/tui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,22 @@ export interface TuiOptions {
refreshRate?: number;
}

/**
* Root element of Tui app.
*
* This keeps elements running and manages Components as children.
*
* @example
* ```ts
* const tui = new Tui({
* style: crayon.bgBlack,
* refreshRate: 1000 / 60,
* });
*
* tui.dispatch();
* tui.run();
* ```
*/
export class Tui extends EventEmitter<
{
destroy: EmitterEvent<[]>;
Expand Down

0 comments on commit 626bced

Please sign in to comment.