From 90125566bbaed8b5c6e55ca8dbc432e3433fb73c Mon Sep 17 00:00:00 2001 From: Maximilien Mellen Date: Wed, 19 Feb 2020 21:36:18 +0100 Subject: Enable TS strict mode by default (#3899) Fixes #3324 Co-authored-by: Kitson Kelly --- cli/tests/046_jsx_test.tsx | 5 +++++ cli/tests/048_media_types_jsx.ts | 10 ++++++++++ 2 files changed, 15 insertions(+) (limited to 'cli/tests') diff --git a/cli/tests/046_jsx_test.tsx b/cli/tests/046_jsx_test.tsx index 4e9380eb8..a3df2aad7 100644 --- a/cli/tests/046_jsx_test.tsx +++ b/cli/tests/046_jsx_test.tsx @@ -1,3 +1,8 @@ +declare namespace JSX { + interface IntrinsicElements { + [elemName: string]: any; + } +} const React = { createElement(factory: any, props: any, ...children: any[]) { return {factory, props, children} diff --git a/cli/tests/048_media_types_jsx.ts b/cli/tests/048_media_types_jsx.ts index c2340de35..f6a498fdf 100644 --- a/cli/tests/048_media_types_jsx.ts +++ b/cli/tests/048_media_types_jsx.ts @@ -10,6 +10,16 @@ import { loaded as loadedJsx2 } from "http://localhost:4545/cli/tests/subdir/mt_ import { loaded as loadedJsx3 } from "http://localhost:4545/cli/tests/subdir/mt_text_ecmascript_jsx.j3.jsx"; import { loaded as loadedJsx4 } from "http://localhost:4545/cli/tests/subdir/mt_application_x_javascript_jsx.j4.jsx"; +declare global { + // eslint-disable-next-line @typescript-eslint/no-namespace + namespace JSX { + interface IntrinsicElements { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + [elemName: string]: any; + } + } +} + console.log( "success", loadedTsx1, -- cgit v1.2.3