-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@flow typeerror #3937
Comments
You might need to specify the return type explicitly to |
In the sandbox you linked it fixes the issue, so it probably relates to the further compilation configuration. Are you using legacy decorators for example? As work around it might be worth trying the old |
Have the same issue in my project tsconfig.json {
"compilerOptions": {
"allowSyntheticDefaultImports": true
"target": "es6",
"lib": ["ESNext", "dom"],
"moduleResolution": "Node",
"esModuleInterop": true,
"jsx": "react",
"typeRoots": ["./typings"]
},
} babel
npm ls mobx mobx-react-lite typescript @babel/plugin-proposal-decorators
[email protected] /Users/dima/WorkProjects/correqts-common
└─┬ @correqts-common/[email protected] -> ./chat
├── @babel/[email protected]
├─┬ @mobx-devtools/[email protected]
│ └── [email protected] deduped
├─┬ @svgr/[email protected]
│ └─┬ @svgr/[email protected]
│ └─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├── [email protected]
└─┬ [email protected]
└── [email protected]
|
Intended outcome:
use the
@flow
annotationActual outcome:
type error on
@flow
How to reproduce the issue:
add the
@flow
decorator to a generator inside a classhttps://codesandbox.io/p/sandbox/gifted-dawn-w2vdz9?workspaceId=6ecfa4fe-9261-4054-86f0-83188ee28c65
code sandbox does not show the error, not sure if they show ts errors. I see the error locally in vscode and webstorm.
Versions
"mobx": "^6.13.3",
"mobx-react-lite": "^4.0.7",
"typescript": "^5.6.3",
The text was updated successfully, but these errors were encountered: