Skip to content

Instantly share code, notes, and snippets.

@stevermeister
Created July 15, 2017 18:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stevermeister/950e8095689d5c470c75f0ca87acc0b8 to your computer and use it in GitHub Desktop.
Save stevermeister/950e8095689d5c470c75f0ca87acc0b8 to your computer and use it in GitHub Desktop.
export function forwardRef(forwardRefFn: ForwardRefFn): Type<any> {
(<any>forwardRefFn).__forward_ref__ = forwardRef;
(<any>forwardRefFn).toString = function() { return stringify(this()); };
return (<Type<any>><any>forwardRefFn);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment