Preview:
// define the Post model as required by the client application
interface Post {
	id: number,
	title: string,
	comments: Array<string>,
}

// create a live, observable data model for post 123
let model = new models.Model<Post>({
    	name: 'posts',
    	sync: getPost(123),
streams: [postEvents, commentEvents],
});
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter