| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | 1x 1x 1x 1x | export interface ComponentRef<T> {
current: T;
(val: T): void;
}
export function createRef<T>(): ComponentRef<T> {
//tslint:disable:no-unnecessary-local-variable
const f: any = (function (x: T) {
f.current = x;
});
return f;
}
|