Skip to content

Commit

Permalink
fix: OriginalObject not assignable to type object
Browse files Browse the repository at this point in the history
  • Loading branch information
crookse committed Dec 10, 2022
1 parent 90d1d53 commit ce19c16
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/fake/fake_mixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export function createFake<OriginalConstructor, OriginalObject>(
methodName,
);

if (!((methodName as string) in this.#original)) {
if (!((methodName as string) in (this.#original as Record<string, unknown>))) {
const typeSafeMethodName = String(methodName as string);

throw new FakeError(
Expand Down
2 changes: 1 addition & 1 deletion src/mock/mock_mixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ export function createMock<OriginalConstructor, OriginalObject>(
methodName,
);

if (!((methodName as string) in this.#original)) {
if (!((methodName as string) in (this.#original as Record<string, unknown>))) {
const typeSafeMethodName = String(methodName);
throw new MockError(
`Method "${typeSafeMethodName}" does not exist.`,
Expand Down

0 comments on commit ce19c16

Please sign in to comment.