rewriting spock toolbar in TypeScript