Skip to content

Commit 9e15ac7

Browse files
authored
docs(theming): add type to prevent compilation error in dark mode playground (#3467)
Without type on the parameter, the following error is displayed error TS7006: Parameter 'shouldAdd' implicitly has an 'any' type.
1 parent 86f718d commit 9e15ac7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

static/usage/v7/theming/automatic-dark-mode/angular/example_component_ts.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export class ExampleComponent implements OnInit {
1717
}
1818

1919
// Add or remove the "dark" class on the document body
20-
toggleDarkTheme(shouldAdd) {
20+
toggleDarkTheme(shouldAdd: boolean) {
2121
document.body.classList.toggle('dark', shouldAdd);
2222
}
2323
}

0 commit comments

Comments
 (0)