Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion goldens/material/chips/index.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import { QueryList } from '@angular/core';
import { Subject } from 'rxjs';

// @public
export const MAT_CHIP: InjectionToken<unknown>;
export const MAT_CHIP: InjectionToken<MatChip>;

// @public
export const MAT_CHIP_AVATAR: InjectionToken<unknown>;
Expand Down
2 changes: 1 addition & 1 deletion src/material/chips/chip-action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export class MatChipContent {
_handlePrimaryActionInteraction(): void;
remove(): void;
disabled: boolean;
_edit(): void;
_edit(event: Event): void;
_isEditing?: boolean;
}>(MAT_CHIP);

Expand Down
4 changes: 2 additions & 2 deletions src/material/chips/chip-icons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ export class MatChipEdit extends MatChipAction {
if (!this.disabled) {
event.stopPropagation();
event.preventDefault();
this._parentChip._edit();
this._parentChip._edit(event);
}
}

override _handleKeydown(event: KeyboardEvent) {
if ((event.keyCode === ENTER || event.keyCode === SPACE) && !this.disabled) {
event.stopPropagation();
event.preventDefault();
this._parentChip._edit();
this._parentChip._edit(event);
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/material/chips/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import {ENTER, ModifierKey} from '@angular/cdk/keycodes';
import {InjectionToken} from '@angular/core';
import type {MatChip} from './chip';

/** Key that can be used as a separator between chips. */
export interface SeparatorKey {
Expand Down Expand Up @@ -69,4 +70,4 @@ export const MAT_CHIP_REMOVE = new InjectionToken('MatChipRemove');
/**
* Injection token used to avoid a circular dependency between the `MatChip` and `MatChipAction`.
*/
export const MAT_CHIP = new InjectionToken('MatChip');
export const MAT_CHIP = new InjectionToken<MatChip>('MatChip');
2 changes: 1 addition & 1 deletion src/material/sidenav/drawer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export const MAT_DRAWER_DEFAULT_AUTOSIZE = new InjectionToken<boolean>(
* Used to provide a drawer container to a drawer while avoiding circular references.
* @docs-private
*/
export const MAT_DRAWER_CONTAINER = new InjectionToken('MAT_DRAWER_CONTAINER');
export const MAT_DRAWER_CONTAINER = new InjectionToken<MatDrawerContainer>('MAT_DRAWER_CONTAINER');

@Component({
selector: 'mat-drawer-content',
Expand Down
2 changes: 1 addition & 1 deletion src/material/slider/slider-interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export enum _MatTickMark {
* Used primarily to avoid circular imports.
* @docs-private
*/
export const MAT_SLIDER = new InjectionToken<{}>('_MatSlider');
export const MAT_SLIDER = new InjectionToken<_MatSlider>('_MatSlider');

/**
* Injection token that can be used to query for a `MatSliderThumb`.
Expand Down
Loading