canonical / canonical/superhref

Evaluate the practical implications of forcing eager top-level types evaluation

Open
#15 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

There must be a reason why Typescript doesn't merge unions by default, overriding the default behavior to improve readability mustn't be a default behavior in a library in my opinion.

This impacts type inferring performance, and developers expectation of how types usually behave (not only you as a consumer).

While this maybe a useful utility it might not be wrapped by default internally in the library.

_Originally posted by @goulinkh in https://github.com/canonical/superhref/pull/4#discussion_r3537069893_

1. Measure the impact on the TS compiler performance.
2. Make sure that it doesn't negatively impact the type definition generation.
3. Evaluate alternative approaches (if any).

Contributor guide

Open the contributing guide

Research direction

Start by locating the library's eager top-level type evaluation and the TypeScript configuration or build entry point that generates type definitions. Measure TypeScript compiler performance and inspect generated type definitions with and without the behavior. Compare any alternative approaches and document whether the default should remain unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
developer-experience
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.