import type { Component } from '@tramvai/tokens-common' ; export const resolveComponent = async < T extends Component > ( componentOrLoader ) : Promise < T > => { return 'load' in componentOrLoader && typeof componentOrLoader . load === 'function' ? ( await componentOrLoader . load ( ) ) . default : ( componentOrLoader as T ) ; } ;