In Typescript, an object is used to store a set of key-value pairs. Following is a syntax for creating an object in Typescript:

BY Best Interview Question ON 22 Aug 2020

Example

var object_name = {
    key1: “value1”,
    key2: “value”,
    key3: function() {
    },
    key4:[“content1”, “content2”]
};