-
Notifications
You must be signed in to change notification settings - Fork 31
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
webstorm #55
Comments
这个跟 egg-ts-helper 无关,跟 egg 里的声明有关,egg 的声明方式( |
3q |
我的解决方法:添加一个app/index.d.ts,内容如下 import {BaseContextClass, Context, IService} from 'egg';
import 'egg'; // Make sure ts to import egg declaration at first
declare module 'egg' {
export interface Context {
service: IService;
}
export interface IService {
}
export class BaseContextClass {
public ctx: Context;
}
} 这样webstorm就可以识别出来了 |
This was referenced Feb 19, 2020
@duncup 有空的话,帮忙验证一下上面那种做法?我这边没有 webstorm 的 license 了 ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
我试了下这个,发现在 webstorm 中始终无法跳转到 service 下的方法上。在 vs code 里是可用的。想请教下是我姿势不对还是确实和 webstrom 的提示不兼容。
The text was updated successfully, but these errors were encountered: