We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1d15e90 commit 4bf708cCopy full SHA for 4bf708c
projects/classes/horror-factory/src/index.test.ts
@@ -4,7 +4,10 @@ import * as index from "./index";
4
import * as solution from "./solution";
5
6
const { createDemon, createSorcerer, Horror } = process.env.TEST_SOLUTIONS
7
- ? solution
+ ? // TypeScript treats # privates as unique, even across two otherwise identical classes.
8
+ // This assertion "tricks" the type system into treating both Horror classes the same.
9
+ // https://github.com/LearningTypeScript/projects/issues/276
10
+ (solution as typeof index & typeof solution)
11
: index;
12
13
const createMockHorrorSettings = (evil: boolean) => {
0 commit comments