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

infra(tsconfig): noImplicitAny #2562

Merged
merged 5 commits into from
Dec 11, 2023
Merged

infra(tsconfig): noImplicitAny #2562

merged 5 commits into from
Dec 11, 2023

Conversation

ST-DDT
Copy link
Member

@ST-DDT ST-DDT commented Nov 28, 2023

@ST-DDT ST-DDT added p: 1-normal Nothing urgent c: infra Changes to our infrastructure or project setup labels Nov 28, 2023
@ST-DDT ST-DDT added this to the vAnytime milestone Nov 28, 2023
@ST-DDT ST-DDT self-assigned this Nov 28, 2023
@ST-DDT ST-DDT requested a review from a team as a code owner November 28, 2023 14:01
@ST-DDT ST-DDT requested a review from a team November 28, 2023 14:01
@ST-DDT
Copy link
Member Author

ST-DDT commented Nov 28, 2023

I'm really unhappy with typescripts behavior here and I hope this gets better in a future version.

Copy link

codecov bot commented Nov 28, 2023

Codecov Report

Merging #2562 (6963835) into next (60dcfe7) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #2562      +/-   ##
==========================================
- Coverage   99.57%   99.57%   -0.01%     
==========================================
  Files        2805     2806       +1     
  Lines      250179   250192      +13     
  Branches     1106     1108       +2     
==========================================
+ Hits       249122   249131       +9     
- Misses       1029     1033       +4     
  Partials       28       28              
Files Coverage Δ
src/internal/keys.ts 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

@xDivisionByZerox
Copy link
Member

Are you talking about Object.keys not returning the type (keyof T)[]? If thats the case, there is a PR comment in the typescript repository that explains why it is this way.

We could make an internal helper function that is "correctly" typed:

function keys<T extends {}>(obj: T): (keyof T)[] {
  return Object.keys(obj) as (keyof T)[];
}

That way, we only have to cast in one place.

scripts/generate-locales.ts Outdated Show resolved Hide resolved
scripts/apidoc/format.ts Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: infra Changes to our infrastructure or project setup p: 1-normal Nothing urgent
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Turn on noImplicitAny in tsconfig
2 participants