Skip to content

Commit 97b40d0

Browse files
authored
Merge pull request #275 from ryansolid/next
Stop polluting Global Namespace with JSX Types
2 parents 22c0954 + 3cbedc9 commit 97b40d0

38 files changed

+893
-523
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ lib/
55
coverage/
66
types/
77

8-
packages/solid/src/render/jsx.ts
9-
packages/solid/src/static/jsx.ts
8+
packages/solid/src/jsx.d.ts
109
packages/solid/web/server-async/asyncSSR.d.ts
1110
packages/solid/web/server/syncSSR.d.ts
1211
packages/solid/web/src/runtime.d.ts

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
# Changelog
22

3+
## 0.23.0 - 2020-12-05
4+
5+
This release is mostly bug fixes. Breaking change for TS users. JSX types no longer pollutes global namespace. This means you need to update your projects to import it.
6+
7+
For users TS 4.1 or above add to your tsconfig to have JSX types in all your TSX files:
8+
9+
```js
10+
"compilerOptions" {
11+
"jsx": "preserve",
12+
"jsxImportSource": "solid-js",
13+
}
14+
```
15+
Or mixing and matching? You can set JSX types per file using the pragma at the top of each file:
16+
```js
17+
/* @jsxImportSource solid-js */
18+
```
19+
20+
You can now import `JSX` types directly from Solid as neccessary:
21+
```js
22+
import { JSX } from "solid-js";
23+
```
24+
325
## 0.22.0 - 2020-11-14
426

527
### Unified Exports (Deprecation `solid-js/dom`)

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,14 @@ The easiest way to get setup is add `babel-preset-solid` to your .babelrc, or ba
9393
"presets": ["solid"]
9494
```
9595

96+
For TypeScript remember to set your TSConfig to handle Solid's JSX by:
97+
```js
98+
"compilerOptions" {
99+
"jsx": "preserve",
100+
"jsxImportSource": "solid-js",
101+
}
102+
```
103+
96104
> Check out these two introductory articles by [@aftzl](https://github.com/atfzl):
97105
> [Understanding Solid: Reactivity Basics](https://dev.to/atfzl/understanding-solid-reactivity-basics-39kk)<br>
98106
> [Understanding Solid: JSX](https://dev.to/atfzl/understanding-solid-jsx-584p)

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"packages": [
33
"packages/*"
44
],
5-
"version": "0.22.10"
5+
"version": "0.23.0-beta.0"
66
}

0 commit comments

Comments
 (0)