Skip to content

Commit b702faf

Browse files
committed
fix(cdk/a11y): fix lint
1 parent 61bf826 commit b702faf

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

src/cdk/a11y/key-manager/typeahead.ts

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
1-
import {Subject, Subscription} from 'rxjs';
2-
import {A, Z, ZERO, NINE} from '@angular/cdk/keycodes';
3-
import {debounceTime, filter, map, take, tap} from 'rxjs/operators';
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.io/license
7+
*/
8+
9+
import {A, NINE, Z, ZERO} from '@angular/cdk/keycodes';
10+
import {Subject, Observable} from 'rxjs';
11+
import {debounceTime, filter, map, tap} from 'rxjs/operators';
412

513
const DEFAULT_TYPEAHEAD_DEBOUNCE_INTERVAL_MS = 200;
614

@@ -24,7 +32,7 @@ export class Typeahead<T extends TypeaheadItem> {
2432
private _skipPredicateFn?: (item: T) => boolean | undefined;
2533

2634
private readonly _selectedItem = new Subject<T>();
27-
readonly selectedItem = this._selectedItem.asObservable();
35+
readonly selectedItem: Observable<T> = this._selectedItem;
2836

2937
constructor(initialItems: T[], config?: TypeaheadConfig<T>) {
3038
const typeAheadInterval =
@@ -41,7 +49,6 @@ export class Typeahead<T extends TypeaheadItem> {
4149
initialItems.length &&
4250
initialItems.some(item => typeof item.getLabel !== 'function')
4351
) {
44-
console.error('failed', initialItems);
4552
throw new Error('KeyManager items in typeahead mode must implement the `getLabel` method.');
4653
}
4754

0 commit comments

Comments
 (0)