diff options
author | Maximilien Mellen <maxmellen0@gmail.com> | 2020-02-19 21:36:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-19 15:36:18 -0500 |
commit | 90125566bbaed8b5c6e55ca8dbc432e3433fb73c (patch) | |
tree | bf798a408b26264641260395ce8cfc9d4bb37637 /cli/tests | |
parent | 852823fa505d75d61e70e1330bbf366aa248e650 (diff) |
Enable TS strict mode by default (#3899)
Fixes #3324
Co-authored-by: Kitson Kelly <me@kitsonkelly.com>
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/046_jsx_test.tsx | 5 | ||||
-rw-r--r-- | cli/tests/048_media_types_jsx.ts | 10 |
2 files changed, 15 insertions, 0 deletions
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, |