Commit graph

19 commits

Author SHA1 Message Date
Dunqing
59ce38bb85 fix(isolated-declarations): inferring of UnrayExpression incorrectly (#3920)
close: #3914
2024-06-26 07:21:35 +00:00
Dunqing
5e2baf3edd feat(isolated-declarations): report error for expando functions (#3872)
close: #3703
2024-06-24 10:56:23 +00:00
Dunqing
58e54f4aea fix(isolated-declarations): report an error for parameters if they are ObjectPattern or ArrayPattern without an explicit type (#3810) 2024-06-21 10:20:28 +00:00
Dunqing
a37138f1ec feat(isolated-declarations): improve the inference template literal (#3797) 2024-06-20 15:02:45 +00:00
Dunqing
b0d7355c98 feat(isolated-declarations): transform const expression correctly (#3793) 2024-06-20 15:02:41 +00:00
Dunqing
2821e0e307 feat(codegen): print readonly keyword for TSIndexSignature (#3791) 2024-06-20 10:13:51 +00:00
Dunqing
7d47fc3fcc fix(isolated-declarations): should stripe async and generator keyword after transformed (#3790) 2024-06-20 10:13:44 +00:00
Dunqing
97575d8cab feat(codegen): print TSClassImplements and TSThisParameter (#3786)
close: https://github.com/oxc-project/oxc/issues/3692#issuecomment-2178994839
2024-06-20 06:15:23 +00:00
Dunqing
497769cb60 feat(ast): add some visitor functions (#3785) 2024-06-20 05:23:04 +00:00
Dunqing
b38c34dfce feat(isolated-declarations): support inferring ParenthesizedExpression (#3769) 2024-06-19 15:43:21 +00:00
Dunqing
8ce794d740 fix(isolated-declarations): inferring an incorrect return type when there is an arrow function inside a function (#3768) 2024-06-19 15:43:15 +00:00
Dunqing
94202de250 feat(isolated-declarations): add export {} when needed (#3754)
https://github.com/microsoft/TypeScript/pull/58912
2024-06-19 14:33:27 +00:00
Dunqing
d29316a5ff fix(isolated-declarations): transform incorrectly when there are multiple functions with the same name (#3753) 2024-06-19 14:33:25 +00:00
Dunqing
e95d8e3990 feat(isolated-declarations): shrink span for arrow function that needs an explicit return type (#3752)
Current `span` we can't be consistent with typescript.

We report the following
```ts
(a, b) =>
^^^^^^^^^
{ }
^
```

TypeScript reports the following
```ts
(a, b) =>
^^^^^^^^^
{}
```

The TypeScript only reports the first line, if we want it to be exactly the same we need to find the first newline position
2024-06-19 14:33:24 +00:00
Dunqing
bf1c250d56 fix(isolated-declarations): false positives for non-exported binding elements (#3751) 2024-06-19 14:06:08 +00:00
Dunqing
df9971da4c feat(isolated-declarations): improve inferring the return type from function (#3750) 2024-06-19 14:06:05 +00:00
Dunqing
4aea2b158c feat(isolated-declarations): improve inferring the type of accessor (#3749) 2024-06-19 14:06:02 +00:00
Dunqing
9ea30c41ff feat(isolated-declarations): treat AssignmentPattern as optional (#3748) 2024-06-19 14:05:59 +00:00
Boshen
8c02c1dac3 chore(isolated-declarations): add snapshot testing (#3756) 2024-06-19 09:20:17 +00:00