cheminfo / cheminfo/mass-tools

Wrong types for `parts` on `MF.getInfo`

Open
#283 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
9
Forks
0
Avg merge
1d 22h
Merged PRs (30d)
3

Description

In TypeScript: `new MF(sourceMf).getInfo().parts` results in an error because `parts` doesn't always exist (and is not in the types).

Suggested solution: always add a `parts` array, even if there's only one part.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the MF.getInfo entry point and inspect both its implementation and the TypeScript type for the returned parts value. Confirm the behavior for formulas with one and multiple parts, then update the implementation and types so parts is always an array and verify the reported TypeScript error is resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.