Repository navigation
#10979 - Refactor: Explicit/implicit Any type clean up from packages/ketcher-core/src/domain/entities/bond.ts file - #11660
Open
ALexanderSPB wants to merge 6 commits into
Open
ALexanderSPB wants to merge 6 commits into
ALexanderSPB wants to merge 6 commits into
Conversation
NataliaLoginova
self-requested a review
September 8, 2026 12:49
NataliaLoginova
approved these changes
Sep 8, 2026
la-nuta
approved these changes
Sep 14, 2026
la-nuta
left a comment
Collaborator
There was a problem hiding this comment.
Two non-blocking test nits; tsc and the entity suite pass with both applied.
Comment on lines
+158
to
+163
| expect(() => | ||
| SGroup.getMassCentre( | ||
| { atoms } as unknown as StructAtomsAndBondsAccess, | ||
| [1], | ||
| ), | ||
| ).toThrow('SGroup.getMassCentre: atom 1 is not found'); |
Collaborator
There was a problem hiding this comment.
getMassCentre takes Pick<Struct, 'atoms'>, which { atoms } already satisfies — no cast needed here.
Suggested change
| expect(() => | |
| SGroup.getMassCentre( | |
| { atoms } as unknown as StructAtomsAndBondsAccess, | |
| [1], | |
| ), | |
| ).toThrow('SGroup.getMassCentre: atom 1 is not found'); | |
| expect(() => SGroup.getMassCentre({ atoms }, [1])).toThrow( | |
| 'SGroup.getMassCentre: atom 1 is not found', | |
| ); |
|
|
||
| expect(bond.getCenter(struct)).toStrictEqual(bondCenter); | ||
| expect( | ||
| bond.getCenter(struct as unknown as StructAtomsAndBondsAccess), |
Collaborator
There was a problem hiding this comment.
The types are comparable, so a single as StructAtomsAndBondsAccess compiles here and at the other five sites — the as unknown as hop isn't needed.
Collaborator
|
@copilot please make fix based on review comments provided |
Contributor
packages/ketcher-core/src/domain/entities/bond.ts file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
How the feature works? / How did you fix the issue?
(Screenshots, videos, or GIFs, if applicable)
Check list
#1234 – issue name