In typescript, I have the following code:

```
public static sortByProperty<T>( array: T[], prop: string ): void 
{
      var availProps: string[] = Object.getOwnPropertyNames( T ); // or something typeof T, anyway I got error

      if(availProps.length>0 && availProps.indexOf(prop) > -1){
          return array.Sort(function(a, b) {
               var aItem = a[prop];
               var bItem = b[prop]; 
               return ((aItem < bItem ) ? -1 : ((aItem > bItem ) ? 1 : 0));
          });
      }
}

```

and I want to use like

```
Test.sortByProperty<MyObject>(arrayOf_MyObject, "APropertyName");

```

I got error that `T` is unknown