@@ -12,7 +12,7 @@ import {SignalLike, WritableSignalLike} from '../behaviors/signal-like/signal-li
12
12
import { ListItem } from '../behaviors/list/list' ;
13
13
14
14
/** Represents the required inputs for a combobox. */
15
- export type ComboboxInputs < T extends ListItem < V > , V > = {
15
+ export interface ComboboxInputs < T extends ListItem < V > , V > {
16
16
/** The controls for the popup associated with the combobox. */
17
17
popupControls : SignalLike < ComboboxListboxControls < T , V > | ComboboxTreeControls < T , V > | undefined > ;
18
18
@@ -30,10 +30,10 @@ export type ComboboxInputs<T extends ListItem<V>, V> = {
30
30
31
31
/** The value of the first matching item in the popup. */
32
32
firstMatch : SignalLike < V | undefined > ;
33
- } ;
33
+ }
34
34
35
35
/** An interface that allows combobox popups to expose the necessary controls for the combobox. */
36
- export type ComboboxListboxControls < T extends ListItem < V > , V > = {
36
+ export interface ComboboxListboxControls < T extends ListItem < V > , V > {
37
37
/** A unique identifier for the popup. */
38
38
id : ( ) => string ;
39
39
@@ -78,9 +78,10 @@ export type ComboboxListboxControls<T extends ListItem<V>, V> = {
78
78
79
79
/** Sets the value of the combobox based on the selected item. */
80
80
setValue : ( value : V | undefined ) => void ; // For re-setting the value if the popup was destroyed.
81
- } ;
81
+ }
82
82
83
- export type ComboboxTreeControls < T extends ListItem < V > , V > = ComboboxListboxControls < T , V > & {
83
+ export interface ComboboxTreeControls < T extends ListItem < V > , V >
84
+ extends ComboboxListboxControls < T , V > {
84
85
/** Whether the currently active item in the popup is collapsible. */
85
86
isItemCollapsible : ( ) => boolean ;
86
87
@@ -98,7 +99,7 @@ export type ComboboxTreeControls<T extends ListItem<V>, V> = ComboboxListboxCont
98
99
99
100
/** Collapses all nodes in the tree. */
100
101
collapseAll : ( ) => void ;
101
- } ;
102
+ }
102
103
103
104
/** Controls the state of a combobox. */
104
105
export class ComboboxPattern < T extends ListItem < V > , V > {
0 commit comments