Fix some TS compiler errors in the flash.text package