UNPKG

zents

Version:

ZenTS is a Node.js & TypeScript MVC-Framework for building rich web applications, released as free and open-source software under the MIT License. It is designed for building web applications with modern tools and design patterns.

24 lines (23 loc) 1.13 kB
import type { LoadModuleResult } from '../types/interfaces'; /** * The AbstractZenFileLoader acts as a base class for ZenTS's loader classes (e.g. ControllerLoader). * It's main purpose is to supply an interface to easy load modules dynamiclly and parsing them to the * extending classes in a unified way. If you write a new loader, you should use this class to load the * Node.js modules. */ export declare abstract class AbstractZenFileLoader { /** * Load a given module and returns an unitialized version of the module. The exported class is guessed either * by using the default export (CommonJS) or by using the modules filename to determine the exported member. * This function will throw an error when no exported member could be found. * * @param filePath Absolute path to the module file */ protected loadModule<T>(filePath: string): Promise<LoadModuleResult<T>>; /** * Returns all method names of a class. * * @param classObjProto The prototype of a class */ protected getClassMethods(classObjProto: Record<string, unknown> | null): string[]; }