Skip to content

fix(types): add type checking script and fix errors in tests#114

Open
rmlearney-digicatapult wants to merge 6 commits into
decentralized-identity:mainfrom
rmlearney-digicatapult:fix/type-check
Open

fix(types): add type checking script and fix errors in tests#114
rmlearney-digicatapult wants to merge 6 commits into
decentralized-identity:mainfrom
rmlearney-digicatapult:fix/type-check

Conversation

@rmlearney-digicatapult
Copy link
Copy Markdown
Contributor

@rmlearney-digicatapult rmlearney-digicatapult commented May 22, 2026

First pass to enforce type safety

Implemented bunx tsc --noEmit as package script

Fixed errors in tests with strict non-null assertions, enum comparison

Expanded tsconfig to include scripts

NB merge after #113

enforce assertionMethod

negative test case for regressions

use dataintegrityprooftemplate and other types more widely

line

enhanced witness methods and did:key handling

centralise did key utilities and use in assertions

count verified witness approvals

Signed-off-by: rmlearney-digicatapult <robert.learney@digicatapult.org.uk>
Signed-off-by: rmlearney-digicatapult <robert.learney@digicatapult.org.uk>
Signed-off-by: rmlearney-digicatapult <robert.learney@digicatapult.org.uk>
Signed-off-by: rmlearney-digicatapult <robert.learney@digicatapult.org.uk>
Signed-off-by: rmlearney-digicatapult <robert.learney@digicatapult.org.uk>
Signed-off-by: rmlearney-digicatapult <robert.learney@digicatapult.org.uk>
return parameters.witness ?? {};
}

if ((parameters as any).witnesses) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

these (parameters as any) should probably be typed with a proper interface as well

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I've had to purposely ignore any in this first pass because there are just too many of them. I've got them cleaned up in a local branch which I'll push after sequential merges of these PRs (they all build incrementally)

@brianorwhatever
Copy link
Copy Markdown
Contributor

This PR is great but appears to recreate a bunch of #113 which do we want to merge?

@rmlearney-digicatapult
Copy link
Copy Markdown
Contributor Author

This PR is great but appears to recreate a bunch of #113 which do we want to merge?

Apologies, I've been building by locally forking latest developments rather than basing directly on main which means each one drags along history. The plan was to put these up to show what I'm working on, then sequentially rebase as the older PRs are merged in

@PatStLouis
Copy link
Copy Markdown
Contributor

@rmlearney-digicatapult looks like this pr has a merge conflict.

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.

3 participants