diff options
| author | David Sherret <dsherret@users.noreply.github.com> | 2023-07-27 14:09:02 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-27 14:09:02 -0400 |
| commit | fa52b5e73374dfd1e76f82207dd59020b6520148 (patch) | |
| tree | ca41133be253fb4feecba5a9848786eddb3b8c68 /cli/tests/testdata/check/jsx_not_checked/main.jsx | |
| parent | 7b29f1c934c3754a49be4100ba0ed5ad628255a8 (diff) | |
fix: do not include jsx without `@ts-check` in tsc roots (#19964)
Closes #19928
Diffstat (limited to 'cli/tests/testdata/check/jsx_not_checked/main.jsx')
| -rw-r--r-- | cli/tests/testdata/check/jsx_not_checked/main.jsx | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/cli/tests/testdata/check/jsx_not_checked/main.jsx b/cli/tests/testdata/check/jsx_not_checked/main.jsx new file mode 100644 index 000000000..8de05f9f7 --- /dev/null +++ b/cli/tests/testdata/check/jsx_not_checked/main.jsx @@ -0,0 +1,21 @@ +// should not error about jsx-runtime not being found in types here +/** @jsxImportSource npm:react@18.2.0 */ + +import "./other.ts"; + +export default ( + <> + <h1>Hello world</h1> + <p>This is a JSX page</p> + </> +); + +/** + * @param {number} a + * @param {number} b + */ +function add(a, b) { + return a + b; +} + +console.log(add("1", "2")); |
