From 8f6bb74e174b0db0616d7d305bdba0405f790c19 Mon Sep 17 00:00:00 2001 From: Evan Hahn Date: Thu, 9 Nov 2023 09:30:29 -0600 Subject: [PATCH] GIF: fix type errors --- public/gif/constants.js | 13 +------------ public/gif/getNodeUi.js | 1 + 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/public/gif/constants.js b/public/gif/constants.js index c0bc867..5302cc4 100644 --- a/public/gif/constants.js +++ b/public/gif/constants.js @@ -1,7 +1,7 @@ // @ts-check /** @enum {string} */ -const types = [ +export const GifNodeType = [ "root", "header", @@ -49,14 +49,3 @@ const types = [ result[id] = id; return result; }, Object.create(null)); - -// TODO: Revert this and just export the thing -export const GifNodeType = new Proxy(types, { - get(target, prop) { - const result = target[prop]; - if (!result) { - throw new Error(`cannot get ${String(prop)}`); - } - return result; - }, -}); diff --git a/public/gif/getNodeUi.js b/public/gif/getNodeUi.js index 614c1f3..ac8e508 100644 --- a/public/gif/getNodeUi.js +++ b/public/gif/getNodeUi.js @@ -220,6 +220,7 @@ const NODE_UI_FNS = { // Local color table [GifNodeType.localColorTable]: ({ children }) => ({ + title: "Local Color Table", description: p( `The Local Color Table is a list of colors for this frame. Each color is encoded as three bytes: one for red, one for green, and one for blue. The number of colors in the table is ${ pluralize(children?.length || 0, "color")