nextcloud / nextcloud/end_to_end_encryption
Remove duplicate metadata type declarations from `src/models.ts`
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 320
- Forks
- 36
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 81
Description
While looking at some version discrepancies like this one:
... I noticed that src/models.ts contains metadata types that duplicate the declarations in src/models/metadata.d.ts. These have drifted -- for example, Metadata.version only permits '2.0', while the implementation supports and emits '2.1'.
Migrate remaining consumers, primarily test fixtures, to the more authoritative IRawMetadata, IRawRootMetadata, and related types, then remove the duplicate declarations from src/models.ts.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/models.ts and compare its metadata declarations with src/models/metadata.d.ts, focusing on the authoritative IRawMetadata, IRawRootMetadata, and related types. Search the remaining consumers, especially test fixtures, and update them to use those declarations. Done means the duplicate declarations are removed from src/models.ts and the affected consumers still type-check and pass their tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- security
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100