import { DependencyIdentifier , NormalizedDependencyIdentifier } from './dependencyIdentifier' ; import { Ctor } from './dependencyItem' ; export interface ForwardRef < T > { unwrap ( ) : Ctor < T > ; } export function forwardRef < T > ( wrapper ) { return { unwrap : wrapper , } ; } export function isForwardRef < T = any > ( thing ) { return ! ! thing && typeof ( thing as any ) . unwrap === 'function' ; } export function normalizeForwardRef < T > ( id ) { if ( isForwardRef ( id ) ) { return id . unwrap ( ) ; } return id ; }