File

src/services/searchSuggestionService/Suggestion.ts

Description

Class to standarize the structure of the suggestions

Index

Properties
Accessors

Constructor

constructor(userInput: string, suggestion: string, index: number)
Parameters :
Name Type Optional
userInput string No
suggestion string No
index number No

Properties

Private _index
Type : number
Private _suggestion
Type : string
Private _userInput
Type : string

Accessors

suggestion
getsuggestion()

Returns de _suggestion attribute of the class

Returns : string
setsuggestion(suggestion: string)

Sets the _suggestion attribute of the class

Parameters :
Name Type Optional
suggestion string No
Returns : void
index
getindex()

Returns the _index attribute of the class

setindex(index: number)

Sets the _index attribute of the class This index indicates in which position of the source array it was

Parameters :
Name Type Optional
index number No
Returns : void
userInput
getuserInput()

Returns the _userInput attribute of the class

setuserInput(userInput: string)

Sets the _userInput attribute of the class It indicated the original input which resulted in the current suggestion

Parameters :
Name Type Optional
userInput string No
Returns : void

results matching ""

    No results matching ""