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
This fixes the 'Expected =>, got :' error when parsing function parameters
with import type annotations. The issue occurred because the parser was
trying to parse import types as function types. By checking for import
types first in parse_ts_non_conditional_type, we ensure they are parsed
correctly.
Fixes#9802
Co-Authored-By: 강동윤 <kdy.1997.dev@gmail.com>
Describe the bug
When declare a type with
import(path).target
statement with generic argument, SWC throws a compilation error like below.You can reproduce the bug by below commands, or preview by its workflow result.
git clone https://github.com/samchon/typia-issue-1429-by-swc-bug cd typia-issue-1429-by-swc-bug npm install npm start
Input code
Here is the code occuring the compilation bug of SWC.
The last return statement (its return type) is occuring the bug.
https://github.com/samchon/typia-issue-1429-by-swc-bug/blob/master/src/index.ts
Config
No special configuration, but only the `npx swc src/index.ts` command.
Playground link (or link to the minimal reproduction)
https://github.com/samchon/typia-issue-1429-by-swc-bug
SWC Info output
Expected behavior
No compilation error
Actual behavior
Compilation error with below message
Version
1.10.1
Additional context
I'm developer of
typia
, and my library's key features are shut down by this bug.Thank you for maintaining great ecosystem, and hope to be fixed ASAP.
The text was updated successfully, but these errors were encountered: