我将Angular2 webpack与 WebStorm 一起使用,并参考此示例:
https://github.com/AngularClass/angular2-webpack-starter/blob/master/src/app/app.routes.ts
为什么以下代码有“红色错误提示”
import { WebpackAsyncRoute } from '@angularclass/webpack-toolkit';
import { RouterConfig } from '@angular/router';
export const asyncRoutes: AsyncRoutes = {
// **the error prompt is --TS2304 can't find name ' AsyncRoutes'**
};
export const prefetchRouteCallbacks: Array<IdleCallbacks> = [
// **the error prompt is --TS2304 can't find name 'IdleCallbacks'**
];