anki/ts/editor/noteId.ts
Henrik Giesel 934a9bd24b Split up index.ts into several more files
This is to provide minimal closures for the mutable file-local variables:
- changeTimer
- previousActiveElement
- currentNoteId

This makes it clear, that they should not be used, but rather the
functions which wrap them in an API
2021-02-08 19:48:42 +01:00

10 lines
188 B
TypeScript

let currentNoteId: number | null = null;
export function setNoteId(id: number): void {
currentNoteId = id;
}
export function getNoteId(): number | null {
return currentNoteId;
}