chore: enforce erasable TypeScript syntax
This commit is contained in:
@@ -7,13 +7,14 @@ import type { TUI } from "@earendil-works/pi-tui";
|
||||
export class CountdownTimer {
|
||||
private intervalId: ReturnType<typeof setInterval> | undefined;
|
||||
private remainingSeconds: number;
|
||||
private tui: TUI | undefined;
|
||||
private onTick: (seconds: number) => void;
|
||||
private onExpire: () => void;
|
||||
|
||||
constructor(
|
||||
timeoutMs: number,
|
||||
private tui: TUI | undefined,
|
||||
private onTick: (seconds: number) => void,
|
||||
private onExpire: () => void,
|
||||
) {
|
||||
constructor(timeoutMs: number, tui: TUI | undefined, onTick: (seconds: number) => void, onExpire: () => void) {
|
||||
this.tui = tui;
|
||||
this.onTick = onTick;
|
||||
this.onExpire = onExpire;
|
||||
this.remainingSeconds = Math.ceil(timeoutMs / 1000);
|
||||
this.onTick(this.remainingSeconds);
|
||||
|
||||
|
||||
@@ -32,11 +32,13 @@ function formatTokens(count: number): string {
|
||||
*/
|
||||
export class FooterComponent implements Component {
|
||||
private autoCompactEnabled = true;
|
||||
private session: AgentSession;
|
||||
private footerData: ReadonlyFooterDataProvider;
|
||||
|
||||
constructor(
|
||||
private session: AgentSession,
|
||||
private footerData: ReadonlyFooterDataProvider,
|
||||
) {}
|
||||
constructor(session: AgentSession, footerData: ReadonlyFooterDataProvider) {
|
||||
this.session = session;
|
||||
this.footerData = footerData;
|
||||
}
|
||||
|
||||
setSession(session: AgentSession): void {
|
||||
this.session = session;
|
||||
|
||||
@@ -15,6 +15,7 @@ export class LoginDialogComponent extends Container implements Focusable {
|
||||
private abortController = new AbortController();
|
||||
private inputResolver?: (value: string) => void;
|
||||
private inputRejecter?: (error: Error) => void;
|
||||
private onComplete: (success: boolean, message?: string) => void;
|
||||
|
||||
// Focusable implementation - propagate to input for IME cursor positioning
|
||||
private _focused = false;
|
||||
@@ -29,12 +30,13 @@ export class LoginDialogComponent extends Container implements Focusable {
|
||||
constructor(
|
||||
tui: TUI,
|
||||
providerId: string,
|
||||
private onComplete: (success: boolean, message?: string) => void,
|
||||
onComplete: (success: boolean, message?: string) => void,
|
||||
providerNameOverride?: string,
|
||||
titleOverride?: string,
|
||||
) {
|
||||
super();
|
||||
this.tui = tui;
|
||||
this.onComplete = onComplete;
|
||||
|
||||
const providerInfo = getOAuthProviders().find((p) => p.id === providerId);
|
||||
const providerName = providerNameOverride || providerInfo?.name || providerId;
|
||||
|
||||
@@ -1056,7 +1056,11 @@ class TreeList implements Component {
|
||||
|
||||
/** Component that displays the current search query */
|
||||
class SearchLine implements Component {
|
||||
constructor(private treeList: TreeList) {}
|
||||
private treeList: TreeList;
|
||||
|
||||
constructor(treeList: TreeList) {
|
||||
this.treeList = treeList;
|
||||
}
|
||||
|
||||
invalidate(): void {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user