You even can use npm to generate this for you. Follow this :
npm i guid-typescript --save
And to utilize in your code :
import { Guid } from 'guid-typescript';
export class GuidExample {
public id: Guid;
constructor() {
this.id = Guid.create(); // ==> b77d409a-10cd-4a47-8e94-b0cd0ab50aa1
}
}