Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Add ADR about Type Checking #1286

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

florian-sanders-cc
Copy link
Contributor

What does this PR do?

  • Adds an ADR about Type Checking.

Copy link
Contributor

🔎 A preview has been automatically published : https://clever-components-preview.cellar-c2.services.clever-cloud.com/docs/adr-typechecking/index.html.

This preview will be deleted once this PR is closed.

Copy link
Member

@roberttran-cc roberttran-cc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great ADR!

A couple small corrections to make. 😉

JSDoc's main flaw is that it's fairly verbose.
Although this is a compromise we're willing to accept, there are a few cases where we'd love to see the syntax improve:
- Importing and using generics with JSDoc is tedious and inconvenient, as pointed out in the following issues:
- [JSDoc doesn't support generics correctly - issue #56102 - TypeScript repository](https://github.com/microsoft/TypeScript/issues/27387)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔨 issue:

Suggested change
- [JSDoc doesn't support generics correctly - issue #56102 - TypeScript repository](https://github.com/microsoft/TypeScript/issues/27387)
- [JSDoc doesn't support generics correctly - issue #56102 - TypeScript repository](https://github.com/microsoft/TypeScript/issues/56102)


## What is left to do?

- Find a way to upgrade the TypeScript version when we want (lit labs analyzer)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 suggestion:

Suggested change
- Find a way to upgrade the TypeScript version when we want (lit labs analyzer)
- Find a way to upgrade the TypeScript version when we want

## What is left to do?

- Find a way to upgrade the TypeScript version when we want (lit labs analyzer)
- This should be possible if we move from `custom-elements-manifest/analyzer` & `lit-analyzer` to `@lit-labs/analyzer` but this is not trivial as explained in [Investigate @lit-labs/analyzer usage - issue #1156 - Clever Components repository].
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔨 issue:

Suggested change
- This should be possible if we move from `custom-elements-manifest/analyzer` & `lit-analyzer` to `@lit-labs/analyzer` but this is not trivial as explained in [Investigate @lit-labs/analyzer usage - issue #1156 - Clever Components repository].
- This should be possible if we move from `custom-elements-manifest/analyzer` & `lit-analyzer` to `@lit-labs/analyzer` but this is not trivial as explained in [Investigate @lit-labs/analyzer usage - issue #1156 - Clever Components repository](https://github.com/CleverCloud/clever-components/issues/1156).

Copy link
Contributor

@HeleneAmouzou HeleneAmouzou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ! 👏 Nothing more to add than the comments @roberttran-cc already made !

Copy link
Member

@hsablonniere hsablonniere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great ADR!!! 👏

  • The build step is only here to optimize the code of the components.

Not sure if we really want to but there's an opportunity to mention bare imports. Our source files need a bundling phase to handle such bare imports. Nowadays, they could work as is but with import maps.

Include a note about this if you think it's relevant 😉

Copy link
Member

@Galimede Galimede left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ADR is great, GG Florian! 💪

I have maybe a small suggestion, we do refer to some tools like lit-analyzer or CEM, maybe we could add a section with a link to these projects or add a link directly where they are first mentioned? 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants