1 2 3 4 5 6 7 8 9 10 11 12 13 14
/// <reference path="getTheme.ts" /> /// <reference path="setTheme.ts" /> function toggleTheme() { let theme = getTheme(); if (theme == Theme.Light) { theme = Theme.Dark; } else if (Theme.Dark) { theme = Theme.Light; } setTheme(theme); }