From b14b2d2caf0b4ebaf33dcbe758559c90658f7e5d Mon Sep 17 00:00:00 2001 From: nlko Date: Fri, 23 Feb 2024 10:37:20 +0100 Subject: [PATCH] Add type to prevent compilation error Without type on the parameter, the following error is displayed error TS7006: Parameter 'shouldAdd' implicitly has an 'any' type. --- .../theming/automatic-dark-mode/angular/example_component_ts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/usage/v7/theming/automatic-dark-mode/angular/example_component_ts.md b/static/usage/v7/theming/automatic-dark-mode/angular/example_component_ts.md index add5097b954..c2fec94b65b 100644 --- a/static/usage/v7/theming/automatic-dark-mode/angular/example_component_ts.md +++ b/static/usage/v7/theming/automatic-dark-mode/angular/example_component_ts.md @@ -17,7 +17,7 @@ export class ExampleComponent implements OnInit { } // Add or remove the "dark" class on the document body - toggleDarkTheme(shouldAdd) { + toggleDarkTheme(shouldAdd: boolean) { document.body.classList.toggle('dark', shouldAdd); } }