Run ❯
Get your
own Node
server
❯
Run Code
Ctrl+Alt+R
Change Orientation
Ctrl+Alt+O
Change Theme
Ctrl+Alt+D
Go to Spaces
Ctrl+Alt+P
// Utility types (runtime illustration) interface User { id: number; name: string; email: string; createdAt: Date; } const user: User = { id: 1, name: "Ann", email: "ann@example.com", createdAt: new Date("2020-01-01T00:00:00Z"), }; // Pick / Omit demo at runtime const preview = { id: user.id, name: user.name }; const withoutEmail = { id: user.id, name: user.name, createdAt: user.createdAt }; console.log(JSON.stringify(preview)); console.log(JSON.stringify(withoutEmail));
{"id":1,"name":"Ann"} {"id":1,"name":"Ann","createdAt":"2020-01-01T00:00:00.000Z"}