Skip to content

Commit 5b30ea1

Browse files
Eyasmmalerba
authored andcommitted
fix(material/tooltip): Also explicitly define the type of MatTooltip.message getter as always a string.
We do this since the underlying `._message` type is a string, the message setter can accept null and undefined values, but will convert them to strings before saving to `_message`, so we can always assume someone _reading_ the value will see a plain string.
1 parent 572b0b5 commit 5b30ea1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/material/tooltip/tooltip.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ export class MatTooltip implements OnDestroy, AfterViewInit {
296296

297297
/** The message to be displayed in the tooltip */
298298
@Input('matTooltip')
299-
get message() {
299+
get message(): string {
300300
return this._message;
301301
}
302302

0 commit comments

Comments
 (0)