@furryr/typescript-runtime 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -12,7 +12,7 @@ Load `typescript-runtime` before your TypeScript scripts (add `raw` so the libra
12
12
  isn't re-processed — see [raw attribute](#scripts-marked-with-raw) below):
13
13
 
14
14
  ```html
15
- <script src="./dist/typescript-runtime.global.js" raw></script>
15
+ <script src="https://cdn.jsdelivr.net/npm/@furryr/typescript-runtime@latest/dist/typescript-runtime.global.js" raw></script>
16
16
 
17
17
  <script type="text/typescript">
18
18
  const message: string = 'Hello from TypeScript';
@@ -23,7 +23,7 @@ isn't re-processed — see [raw attribute](#scripts-marked-with-raw) below):
23
23
  External files work too:
24
24
 
25
25
  ```html
26
- <script src="./dist/typescript-runtime.global.js" raw></script>
26
+ <script src="https://cdn.jsdelivr.net/npm/@furryr/typescript-runtime@latest/dist/typescript-runtime.global.js" raw></script>
27
27
  <script type="text/typescript" src="./app.ts"></script>
28
28
  ```
29
29
 
@@ -44,7 +44,7 @@ Any `<script>` with a `raw` attribute is skipped by the runtime. Add `raw` to th
44
44
  library's own script to prevent it from being re-processed:
45
45
 
46
46
  ```html
47
- <script src="./dist/typescript-runtime.global.js" raw></script>
47
+ <script src="https://cdn.jsdelivr.net/npm/@furryr/typescript-runtime@latest/dist/typescript-runtime.global.js" raw></script>
48
48
  ```
49
49
 
50
50
  This is also useful for any third-party scripts you want to exclude from processing.
@@ -73,7 +73,7 @@ Add a `<tsconfig>` element before your TypeScript scripts:
73
73
 
74
74
  ```html
75
75
  <tsconfig src="./tsconfig.browser.json"></tsconfig>
76
- <script src="./dist/typescript-runtime.global.js"></script>
76
+ <script src="https://cdn.jsdelivr.net/npm/@furryr/typescript-runtime@latest/dist/typescript-runtime.global.js" raw></script>
77
77
  <script type="text/typescript" src="./app.ts"></script>
78
78
  ```
79
79
 
@@ -109,8 +109,8 @@ Classic JSX example:
109
109
  {
110
110
  "compilerOptions": {
111
111
  "jsx": "react",
112
- "jsxFactory": "__ts.jsx",
113
- "jsxFragmentFactory": "__ts.Fragment"
112
+ "jsxFactory": "window.jsx",
113
+ "jsxFragmentFactory": "window.Fragment"
114
114
  }
115
115
  }
116
116
  ```
@@ -123,7 +123,8 @@ Then use `type="text/typescript-tsx"` or a `.tsx` file:
123
123
  </script>
124
124
  ```
125
125
 
126
- `typescript-runtime` does not provide a JSX runtime. You must provide `__ts.jsx`, React, or another runtime yourself.
126
+ `typescript-runtime` does not provide a JSX runtime. You must provide `window.jsx`, React, or another runtime yourself.
127
+ For automatic JSX (`"jsx": "react-jsx"`), import `jsx`/`jsxs` from your runtime in your own source; `typescript-runtime` does not inject a JSX runtime import.
127
128
 
128
129
  ## Source Maps
129
130