From aeb8aa0e720370133fb6d9036d35d561f77543ab Mon Sep 17 00:00:00 2001 From: Sebastian Silbermann Date: Thu, 23 Aug 2018 10:11:40 +0200 Subject: [PATCH] theming: add test that would fail at runtime --- types/theming/theming-tests.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/types/theming/theming-tests.tsx b/types/theming/theming-tests.tsx index 2a9a7ced63..18d24923bf 100644 --- a/types/theming/theming-tests.tsx +++ b/types/theming/theming-tests.tsx @@ -2,11 +2,16 @@ import * as React from "react"; import { channel, ContextWithTheme, + Theme, themeListener, ThemeProvider, withTheme } from "theming"; +// Typings currently accept non-plain-objects while they get rejected at runtime. +// There exists currently no typing for plain objects. +const runtimeErrorTheme: Theme = []; + const customTheme = { color: { primary: "red",