typescript sample reduced