diff --git a/src/typeahead/highlight.ts b/src/typeahead/highlight.ts index 6484b2b060..d64a777ff0 100644 --- a/src/typeahead/highlight.ts +++ b/src/typeahead/highlight.ts @@ -38,7 +38,7 @@ export class NgbHighlight implements OnChanges { * The term or array of terms to be highlighted. * Since version `v4.2.0` term could be a `string[]` */ - @Input() term: string | string[]; + @Input() term: string | readonly string[]; ngOnChanges(changes: SimpleChanges) { const result = toString(this.result); diff --git a/src/typeahead/typeahead.ts b/src/typeahead/typeahead.ts index 7dbc78642a..5516f348d3 100644 --- a/src/typeahead/typeahead.ts +++ b/src/typeahead/typeahead.ts @@ -135,7 +135,7 @@ export class NgbTypeahead implements ControlValueAccessor, * * Note that the `this` argument is `undefined` so you need to explicitly bind it to a desired "this" target. */ - @Input() ngbTypeahead: (text: Observable) => Observable; + @Input() ngbTypeahead: (text: Observable) => Observable; /** * The function that converts an item from the result list to a `string` to display in the popup. @@ -367,7 +367,7 @@ export class NgbTypeahead implements ControlValueAccessor, this._renderer.setProperty(this._elementRef.nativeElement, 'value', toString(value)); } - private _subscribeToUserInput(userInput$: Observable): Subscription { + private _subscribeToUserInput(userInput$: Observable): Subscription { return userInput$.subscribe((results) => { if (!results || results.length === 0) { this._closePopup();