finish translating Dan Licata's ts.elf into test/ts-elf.ts