Commit 9e3097b
committed
feature #380 [Turbo] Fix TypeScript compilation issue... again (7-zete-7)
This PR was squashed before being merged into the 2.x branch.
Discussion
----------
[Turbo] Fix TypeScript compilation issue... again
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| License | MIT
_webpack.config.js_:
```js
Encore
...
.enableTypeScriptLoader()
.enableForkedTypeScriptTypesChecking()
```
Error message on `yarn encore production`:
```
Failed to compile with 1 errors
error in vendor/symfony/ux-turbo/Resources/assets/src/turbo_controller.ts:14:8 11:22:22
TS2339: Property 'Turbo' does not exist on type 'Window & typeof globalThis'.
12 |
13 | // Expose Turbo to the rest of the app to allow for dynamic Turbo calls
> 14 | window.Turbo = Turbo;
| ^^^^^
15 |
16 | /**
17 | * Empty Stimulus controller only used for Symfony Flex wiring.
```
Previously, #331 proposed a different solution, but it was rejected due to the changes already being prepared in hotwired/turbo#280. At the moment, the changes in the second package have been made, as a result of which it is possible to change lines that cause a compilation error.
Commits
-------
25482a7 [Turbo] Fix TypeScript compilation issue... againFile tree
3 files changed
+3
-7
lines changed- src/Turbo/Resources/assets
- dist
- src
3 files changed
+3
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
| 11 | + | |
15 | 12 | | |
16 | 13 | | |
17 | 14 | | |
| |||
0 commit comments