I have this List object, but later on the shape changed, I need an extra id property, but how to not modify List?
interface List {
name: string //without adding id here
}
interface ListData {
type: string
lists: List[] //how to include id here?
}
const data: ListData = {
type: 'something',
lists: [{
id: '1',
name: 'alice'
}, {
id: '2',
name: 'ja'
}]
}