typescript set empty object code example
Example 1: init empty object typescript
type User = {
Username: string;
Email: string;
}
const user01 = {} as User;
const user02 = <User>{};
user01.Email = "[email protected]";
Example 2: how to create empty object typescript
const _params = {} as any;
_params.name ='nazeh abel'