Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

init empty object typescript

type User = {
    Username: string;
    Email: string;
}

const user01 = {} as User;
const user02 = <User>{};

user01.Email = "foo@bar.com";
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #init #empty #object #typescript
ADD COMMENT
Topic
Name
8+3 =