我有这两个文件:
core.ts
import * as express from "express";
namespace Routes {
interface pageParams {
req: express.Request,
res: express.Response,
next: express.NextFunction
};
}
login.ts
/// <reference path="core.ts"/>
namespace Routes {
export class index {
public index(params: pageParams) {
params.res.render('index');
}
}
}
login.ts无法看到pageParams&#39;接口。我错过了什么? 谢谢。