Q:

typescript static class equivalent

//Example of Typescript static class equivalent
export abstract class Tools {   
  public static truncate(str, length) { 
    var ending = '...'; 
    if (str.length > length) { 
      return str.substring(0, length - ending.length) + ending; 
    } else { 
      return str; 
    } 
  }; 
}
0

New to Communities?

Join the community