add typescript implementation
update readme and example