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

feat: enable noImplicitOverride tsc setting #135

Merged
merged 2 commits into from
Sep 7, 2021

Conversation

wschurman
Copy link
Member

Why

This enables noImplicitOverride as described in #134.

How

Enable the flag, fix tsc.

Test Plan

Wait for CI tests.

Copy link
Member

@ide ide left a comment

Choose a reason for hiding this comment

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

If a type declaration (d.ts) includes override, can older version of TypeScript use those declarations? Asking since this change might require upgrading www's version of TS in order to use these changes.

Looks like Prettier needs to run over all the files again.

@codecov
Copy link

codecov bot commented Sep 7, 2021

Codecov Report

Merging #135 (f29c27f) into @wschurman/upgrade-ts-again (2b1852d) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@                     Coverage Diff                      @@
##           @wschurman/upgrade-ts-again     #135   +/-   ##
============================================================
  Coverage                        95.79%   95.80%           
============================================================
  Files                               70       70           
  Lines                             1809     1810    +1     
  Branches                           223      223           
============================================================
+ Hits                              1733     1734    +1     
  Misses                              75       75           
  Partials                             1        1           
Flag Coverage Δ
integration 95.80% <100.00%> (+<0.01%) ⬆️
unittest 95.80% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...-knex/src/PostgresEntityDatabaseAdapterProvider.ts 100.00% <ø> (ø)
...ndary-cache-redis/src/RedisSecondaryEntityCache.ts 100.00% <ø> (ø)
...-adapter-knex/src/PostgresEntityDatabaseAdapter.ts 100.00% <100.00%> (ø)
...s/entity-example/src/entities/NotePrivacyPolicy.ts 100.00% <100.00%> (ø)
.../src/__integration-tests__/entities/ChildEntity.ts 100.00% <100.00%> (ø)
...src/__integration-tests__/entities/ParentEntity.ts 100.00% <100.00%> (ø)
packages/entity/src/EntityAssociationLoader.ts 100.00% <100.00%> (ø)
packages/entity/src/EntityCompanionProvider.ts 100.00% <100.00%> (ø)
packages/entity/src/EntityFields.ts 100.00% <100.00%> (ø)
packages/entity/src/EntityMutator.ts 98.20% <100.00%> (ø)
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2b1852d...f29c27f. Read the comment docs.

@wschurman
Copy link
Member Author

wschurman commented Sep 7, 2021

If a type declaration (d.ts) includes override, can older version of TypeScript use those declarations? Asking since this change might require upgrading www's version of TS in order to use these changes.

The way I understand it this is the inverse strategy of some other languages open (kotlin), virtual (C#), etc since it is only declared on the subclass and is only checked against the superclass if the subclasses tsconfig includes the directive. What this means for libraries is that unless the destination project has the directive and the member has the modifier it won't check that it overrides the library's member.

As for whether the override modifier is included in the .d.ts for completeness even though it doesn't have an effect on consumers, I don't think it does, but again it shouldn't matter since it only affects the typechecking of that class against its parent.

The noImplicitOverride setting is somewhat like the open and virtual but only affects things in its project, not dependent projects, due to its nature as a flag in tsconfig.

Base automatically changed from @wschurman/upgrade-ts-again to master September 7, 2021 22:17
@wschurman wschurman merged commit 4263cb9 into master Sep 7, 2021
@wschurman wschurman deleted the @wschurman/upgrade-ts-again-2 branch September 7, 2021 22:18
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.

2 participants