I want to define the type of an Object literal, with key valye pairs, like below. In any way can't manage this. Please help.
export const endPoints: {name: string: {method: string; url: string;}} = {
allFeed: {
method: 'GET',
url: 'https://www.yammer.com/api/v1/messages.json'
},
topFeed: {
method: 'GET',
url: 'https://www.yammer.com/api/v1/messages/algo.json'
},
followingFeed: {
method: 'GET',
url: 'https://www.yammer.com/api/v1/messages/following.json'
},
defaultFeed: {
method: 'GET',
url: 'https://www.yammer.com/api/v1/messages.json/my_feed.json'
}
};