@@ -6,8 +6,29 @@ Output.__index = Output
66--- @class Output
77--- @field lines table<number , string>
88--- @field metadata table<number , OutputMetadata>
9- --- @field extmarks table<number , OutputExtmark> -- Stores extmarks for each line
10- --- @field actions table<number , OutputAction[]> -- Stores contextual actions for each line range
9+ --- @field extmarks table<number , OutputExtmark>
10+ --- @field actions OutputAction[]
11+ --- @field add_line fun ( self : Output , line : string , fit ?: boolean ): number
12+ --- @field get_line fun ( self : Output , idx : number ): string ?
13+ --- @field get_metadata fun ( self : Output , idx : number ): OutputMetadata ?
14+ --- @field get_nearest_metadata fun ( self : Output , idx : number , predicate ?: function , direction ?: string ): OutputMetadata | nil
15+ --- @field get_all_metadata fun ( self : Output ): OutputMetadata[]
16+ --- @field get_previous_snapshot fun ( self : Output , line : number ): string ?
17+ --- @field get_next_snapshot fun ( self : Output , line : number ): string ?
18+ --- @field get_first_snapshot fun ( self : Output ): string ?
19+ --- @field get_last_snapshot fun ( self : Output ): string ?
20+ --- @field merge_line fun ( self : Output , idx : number , text : string )
21+ --- @field add_lines fun ( self : Output , lines : string[] , prefix ?: string )
22+ --- @field add_empty_line fun ( self : Output ): number ?
23+ --- @field add_metadata fun ( self : Output , metadata : OutputMetadata ): number ?
24+ --- @field clear fun ( self : Output )
25+ --- @field get_line_count fun ( self : Output ): number
26+ --- @field get_lines fun ( self : Output ): string[]
27+ --- @field add_extmark fun ( self : Output , idx : number , extmark : OutputExtmark | fun (): OutputExtmark )
28+ --- @field get_extmarks fun ( self : Output ): table<number , table[]>
29+ --- @field add_actions fun ( self : Output , actions : OutputAction[] )
30+ --- @field add_action fun ( self : Output , action : OutputAction )
31+ --- @field get_actions_for_line fun ( self : Output , line : number ): OutputAction[] ?
1132--- @return self Output
1233function Output .new ()
1334 local self = setmetatable ({}, Output )
0 commit comments