Matsuuu / web-component-devtools

Web Component DevTools is a Browser Extension enhancing the development experience of Web Component developers
https://matsuuu.github.io/web-component-devtools/
MIT License
131 stars 3 forks source link

Code Notes #45

Closed busynest closed 2 years ago

busynest commented 2 years ago

File: devtools-inspector-category

renderItem() > renderProperty() : Expected 2 arguments, but got 1. updateTimeout : Type 'null' is not assignable to type 'number'.

TypeScript declare type CustomEvent MESSAGE_TYPE

checkIfMutationIsRelevantReSelectEvent not used.

plus more

I already updated the project to TypeScript, and many errors are popping up

Matsuuu commented 2 years ago

There is some work in typing + docs i'm working on.

A full transition to TS will never happen though. It's purely a JS+ JSDoc project

busynest commented 2 years ago

October 3

@param {string | number} tabId tabSites[tabId] error is being thrown for tabId, I thnk it doesn't like numbers.

busynest commented 2 years ago

I think that is it for errors. But 2 patterns also show errors

  1. CustomEvents have an object for first argument, I guess this works, but doesn't help declaring custom events.
  2. const x = function(). This might be bad practice.