From b1a4dfac7ca63802d205e671cedcdf120bb707ab Mon Sep 17 00:00:00 2001 From: Idrees Hassan Date: Sun, 26 Oct 2025 13:52:13 -0400 Subject: [PATCH] Add jsconfig file --- dist/birb.js | 15 +-------------- dist/birb.user.js | 17 ++--------------- jsconfig.json | 7 +++++++ manifest.json | 2 +- src/Frame.js | 1 - src/Layer.js | 2 -- src/birb.js | 4 ---- src/frame.js | 1 - src/layer.js | 2 -- src/sharedConstants.js | 2 -- src/sprites.js | 4 +--- 11 files changed, 12 insertions(+), 45 deletions(-) create mode 100644 jsconfig.json diff --git a/dist/birb.js b/dist/birb.js index e6b8f0c..c62d152 100644 --- a/dist/birb.js +++ b/dist/birb.js @@ -1,16 +1,12 @@ (function () { 'use strict'; - // @ts-check - const Directions = { LEFT: -1, RIGHT: 1, }; - // @ts-check - - // Sprite theme color indicators + /** Indicators for parts of the base bird sprite sheet */ const Sprite = { THEME_HIGHLIGHT: "theme-highlight", TRANSPARENT: "transparent", @@ -210,8 +206,6 @@ }), }; - // @ts-check - class Layer { /** * @param {string[][]} pixels @@ -223,8 +217,6 @@ } } - // @ts-check - class Frame { /** @type {{ [tag: string]: string[][] }} */ @@ -291,9 +283,6 @@ } } } } - // @ts-check - - // @ts-ignore const SHARED_CONFIG = { birbCssScale: 1, @@ -1017,7 +1006,6 @@ const canvas = document.createElement("canvas"); /** @type {CanvasRenderingContext2D} */ - // @ts-expect-error const ctx = canvas.getContext("2d"); const States = { @@ -1389,7 +1377,6 @@ const textarea = noteElement.querySelector(".birb-sticky-note-input"); if (textarea && textarea instanceof HTMLTextAreaElement) { - /** @type {NodeJS.Timeout | undefined} */ let saveTimeout; // Save after debounce textarea.addEventListener("input", () => { diff --git a/dist/birb.user.js b/dist/birb.user.js index a524d73..6ea24a4 100644 --- a/dist/birb.user.js +++ b/dist/birb.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name Pocket Bird // @namespace https://idreesinc.com -// @version 2025.10.26.37 +// @version 2025.10.26.43 // @description birb // @author Idrees // @downloadURL https://github.com/IdreesInc/Pocket-Bird/raw/refs/heads/main/dist/birb.user.js @@ -15,16 +15,12 @@ (function () { 'use strict'; - // @ts-check - const Directions = { LEFT: -1, RIGHT: 1, }; - // @ts-check - - // Sprite theme color indicators + /** Indicators for parts of the base bird sprite sheet */ const Sprite = { THEME_HIGHLIGHT: "theme-highlight", TRANSPARENT: "transparent", @@ -224,8 +220,6 @@ }), }; - // @ts-check - class Layer { /** * @param {string[][]} pixels @@ -237,8 +231,6 @@ } } - // @ts-check - class Frame { /** @type {{ [tag: string]: string[][] }} */ @@ -305,9 +297,6 @@ } } } } - // @ts-check - - // @ts-ignore const SHARED_CONFIG = { birbCssScale: 1, @@ -1031,7 +1020,6 @@ const canvas = document.createElement("canvas"); /** @type {CanvasRenderingContext2D} */ - // @ts-expect-error const ctx = canvas.getContext("2d"); const States = { @@ -1403,7 +1391,6 @@ const textarea = noteElement.querySelector(".birb-sticky-note-input"); if (textarea && textarea instanceof HTMLTextAreaElement) { - /** @type {NodeJS.Timeout | undefined} */ let saveTimeout; // Save after debounce textarea.addEventListener("input", () => { diff --git a/jsconfig.json b/jsconfig.json new file mode 100644 index 0000000..3eb5dfa --- /dev/null +++ b/jsconfig.json @@ -0,0 +1,7 @@ +{ + "compilerOptions": { + "checkJs": true, + "target": "es2017" + }, + "include": ["src"] +} \ No newline at end of file diff --git a/manifest.json b/manifest.json index c4161df..f5cd6bc 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 3, "name": "Pocket Bird", "description": "It's a bird, in your browser. What more could you want?", - "version": "2025.10.26.37", + "version": "2025.10.26.43", "homepage_url": "https://idreesinc.com", "content_scripts": [ { diff --git a/src/Frame.js b/src/Frame.js index 2f57faa..2400ec2 100644 --- a/src/Frame.js +++ b/src/Frame.js @@ -1,4 +1,3 @@ -// @ts-check import { Directions } from './sharedConstants.js'; import { Sprite, BirdType } from './sprites.js'; import Layer from './layer.js'; diff --git a/src/Layer.js b/src/Layer.js index 84c6661..cd33990 100644 --- a/src/Layer.js +++ b/src/Layer.js @@ -1,5 +1,3 @@ -// @ts-check - class Layer { /** * @param {string[][]} pixels diff --git a/src/birb.js b/src/birb.js index 085388d..14c6962 100644 --- a/src/birb.js +++ b/src/birb.js @@ -1,5 +1,3 @@ -// @ts-check - import { Directions } from './sharedConstants.js'; @@ -402,7 +400,6 @@ Promise.all([ const canvas = document.createElement("canvas"); /** @type {CanvasRenderingContext2D} */ - // @ts-expect-error const ctx = canvas.getContext("2d"); const States = { @@ -774,7 +771,6 @@ Promise.all([ const textarea = noteElement.querySelector(".birb-sticky-note-input"); if (textarea && textarea instanceof HTMLTextAreaElement) { - /** @type {NodeJS.Timeout | undefined} */ let saveTimeout; // Save after debounce textarea.addEventListener("input", () => { diff --git a/src/frame.js b/src/frame.js index 2f57faa..2400ec2 100644 --- a/src/frame.js +++ b/src/frame.js @@ -1,4 +1,3 @@ -// @ts-check import { Directions } from './sharedConstants.js'; import { Sprite, BirdType } from './sprites.js'; import Layer from './layer.js'; diff --git a/src/layer.js b/src/layer.js index 84c6661..cd33990 100644 --- a/src/layer.js +++ b/src/layer.js @@ -1,5 +1,3 @@ -// @ts-check - class Layer { /** * @param {string[][]} pixels diff --git a/src/sharedConstants.js b/src/sharedConstants.js index 603675f..5bd42fa 100644 --- a/src/sharedConstants.js +++ b/src/sharedConstants.js @@ -1,5 +1,3 @@ -// @ts-check - export const Directions = { LEFT: -1, RIGHT: 1, diff --git a/src/sprites.js b/src/sprites.js index 3ec7b06..14884d4 100644 --- a/src/sprites.js +++ b/src/sprites.js @@ -1,6 +1,4 @@ -// @ts-check - -// Sprite theme color indicators +/** Indicators for parts of the base bird sprite sheet */ export const Sprite = { THEME_HIGHLIGHT: "theme-highlight", TRANSPARENT: "transparent",