return types in typescript
This commit is contained in:
parent
42089136e1
commit
510906437f
3 changed files with 22 additions and 22 deletions
|
@ -1,12 +1,12 @@
|
|||
const nsfwOk = 'nsfw-ok';
|
||||
const dialog = document.getElementById('nsfw-dialog')! as HTMLDialogElement;
|
||||
|
||||
function yes() {
|
||||
function yes(): void {
|
||||
localStorage.setItem(nsfwOk, '1');
|
||||
dialog.close();
|
||||
}
|
||||
|
||||
function setup() {
|
||||
function setup(): void {
|
||||
if (!localStorage.getItem(nsfwOk)) {
|
||||
(dialog.querySelector('#nsfw-yes') as HTMLElement).onclick = yes;
|
||||
// nsfw-no is a normal link
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue