type Note = { title: string; tags: string[] }
const notebook: Note[] = [
{ title: '记录一个问题', tags: ['思考'] },
{ title: '整理一种方法', tags: ['实践'] },
]
function revisit(topic: string) {
return notebook.filter(({ tags }) => tags.includes(topic))
}type Note = { title: string; tags: string[] }
const notebook: Note[] = [
{ title: '记录一个问题', tags: ['思考'] },
{ title: '整理一种方法', tags: ['实践'] },
]
function revisit(topic: string) {
return notebook.filter(({ tags }) => tags.includes(topic))
}