How to use record types in Typescript

Today I'm facing a problem, I want an object that has a list of properties but with specific values ​​like:

For example:

export type NBATeam = "Lakers" | "Celtics" | "Bulls" | "Warriors";

const nbaChampionships = {
   
    
    
    Lakers: 17,
    Celtics

Guess you like

Origin blog.csdn.net/qq_52010446/article/details/132296693