This commit enhances type safety and fixes type-related issues throughout the project including: - Updated type definitions in entities, repositories, and models - Improved type annotations in services and controllers - Fixed type issues in adapters and utilities - Enhanced test file type definitions - Added typings/index.d.ts for global type declarations 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude <noreply@anthropic.com>
20 lines
576 B
TypeScript
20 lines
576 B
TypeScript
import {
|
|
AccessLevel,
|
|
SingletonProto,
|
|
} from '@eggjs/tegg';
|
|
import { NotFoundError, NotImplementedError } from 'egg-errors';
|
|
import { AbstractService } from '../../common/AbstractService.ts';
|
|
import { NOT_IMPLEMENTED_PATH } from '../../common/constants.ts';
|
|
|
|
@SingletonProto({
|
|
accessLevel: AccessLevel.PUBLIC,
|
|
})
|
|
export class HomeService extends AbstractService {
|
|
async misc(path: string) {
|
|
if (NOT_IMPLEMENTED_PATH.includes(path)) {
|
|
throw new NotImplementedError(`${path} not implemented yet`);
|
|
}
|
|
throw new NotFoundError(`${path} not found`);
|
|
}
|
|
}
|