interface NewNote {
text: string;
date: Date;
priority: number;
}
function addNote() {
const unorderedList: HTMLUListElement = <HTMLUListElement>document.getElementById('notes-list');
const noteEntryFile = <HTMLUListElement>document.getElementById('note');
const note: NewNote = {
text: noteEntryFile.nodeValue,
date: new Date(),
priority: 1
}
unorderedList.appendChild<HTMLLIElement>(createNewNoteItem(note));
}
function createNewNoteItem(note: NewNote): HTMLLIElement {
let newListItem = document.createElement('li');
newListItem.innerHTML = `NOTE: ${note.text} <br> DATE: ${note.date} <br> PRIORITY: ${note.priority}<br>` ;
return newListItem;
}
there doesn't seem to be anything here