fix generating ts file