Skip to content

Commit

Permalink
fix(store): fix exo-tools TSC problem
Browse files Browse the repository at this point in the history
Running tsc in the new swingset-xs-supervisor package caused this
unrelated line in packages/store to start complaining. Removing the
ts-expect-error caused it to fail tsc when run in
packages/store. Thanks to @mfig for a fix that appeased both cases.
  • Loading branch information
warner committed Mar 7, 2023
1 parent 3702f0d commit 3bf3842
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions packages/store/src/patterns/exo-tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,16 +226,7 @@ export const defendPrototype = (
);
}

// TODO If I leave the following line of code unmarked, then it fails
// locally with a type error. If I annotation it with the following line,
// then it fails in CI "Unused 'at-ts-expect-error' directive.".
// at-ts-expect-error could be instantiated with different subtype
// So we use at-ts-ignore instead, and then have to suppress the
// complaint that we should use at-ts-expect-error instead.
//
// eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error
// @ts-ignore
return Far(tag, prototype);
return Far(tag, /** @type {T} */ (prototype));
};
harden(defendPrototype);

Expand Down

0 comments on commit 3bf3842

Please sign in to comment.