Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import {
BaseContextClass,
Context,
Application,
Agent,
Controller,
Service,
EggAppConfig,
PowerPartial,
Singleton,
} from 'egg';
new BaseContextClass({} as Context).ctx;
class MyController extends Controller {
async test() {
this.ctx.locals.test.localsCheckAny();
this.app.config.keys.configKeysCheckAny();
this.app.appCheckAny();
}
}
new MyController();
// service
class MyService extends Service {
async test() {
this.ctx.locals.test.serviceLocalCheckAny();
this.app.config.keys.serviceConfigCheckAny();
this.app.serviceAppCheckAny();