@rws-framework/client
Version:
This package provides the core client-side framework for Realtime Web Suit (RWS), enabling modular, asynchronous web components, state management, and integration with backend services. It is located in `.dev/client`.
16 lines (11 loc) • 478 B
text/typescript
import RWSContainer, { Key } from '../_container';
function getFunctionParamNames(func: () => any): string[] {
const constructorMatch = func.toString().match(/constructor\s*\(([^)]*)\)/);
if (!constructorMatch) return null;
return constructorMatch[1].split(',').map(param => param.trim());
}
function loadDep<T>(dependencyKeyClass: Key): T
{
return RWSContainer().get(dependencyKeyClass) as T;
}
export { loadDep, getFunctionParamNames };