```ts
export function sortByLen(words: string[]): string[] {
  // Sort words first by length in ascending order, then alphabetically for equal lengths
  return words.sort((a, b) => {
    if (a.length === b.length) {
      return a.localeCompare(b);
    }
    return a.length - b.length;
  });
}
```