Cookies concent notice

This site uses cookies from Google to deliver its services and to analyze traffic.
Learn more
Skip to main content
This site is no longer updated.Head to Angular.devHome
/

This is the archived documentation for Angular v17. Please visit angular.dev to see this page for the current version of Angular.

resolveForwardRef

Lazily retrieves the reference value from a forwardRef.

See more...

      
      resolveForwardRef<T>(type: T): T
    
Parameters
type T
Returns

T

See also

Description

Acts as the identity function when given a non-forward-ref value.

Further information is available in the Usage Notes...

Usage notes

Example

      
      const ref = forwardRef(() => 'refValue');
expect(resolveForwardRef(ref as any)).toEqual('refValue');
expect(resolveForwardRef('regularValue')).toEqual('regularValue');