You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,26 @@
2
2
3
3
## Unreleased
4
4
5
+
* Fix TypeScript parse error whe a generic function is the first type argument ([#2306](https://github.com/evanw/esbuild/issues/2306))
6
+
7
+
In TypeScript, the `<<` token may need to be split apart into two `<` tokens if it's present in a type argument context. This was already correctly handled for all type expressions and for identifier expressions such as in the following code:
8
+
9
+
```ts
10
+
// These cases already worked in the previous release
11
+
let foo: Array<<T>() => T>;
12
+
bar<<T>() => T>;
13
+
```
14
+
15
+
However, normal expressions of the following form were previously incorrectly treated as syntax errors:
16
+
17
+
```ts
18
+
// These cases were broken but have now been fixed
19
+
foo.bar<<T>() => T>;
20
+
foo?.<<T>() => T>();
21
+
```
22
+
23
+
With this release, these cases now parsed correctly.
24
+
5
25
* Fix minification regression with pure IIFEs ([#2279](https://github.com/evanw/esbuild/issues/2279))
6
26
7
27
An Immediately Invoked Function Expression (IIFE) is a function call to an anonymous function, and is a way of introducing a new function-level scope in JavaScript since JavaScript lacks a way to do this otherwise. And a pure function call is a function call with the special `/* @__PURE__ */` comment before it, which tells JavaScript build tools that the function call can be considered to have no side effects (and can be removed if it's unused).
0 commit comments