I have a typescript class
export class Restaurant { constructor ( private id: string, private name: string ) { } public getId() : string { return th
If you're using TS 2.1, you can use object spread operator to create a shallow copy:
const obj = { a: 1 }; const clonedObj = { ...obj };