diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index bb7cf551942..41cdd514ef4 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -3342,6 +3342,8 @@ function createBinder(): (file: SourceFile, options: CompilerOptions) => void { }); } if (isPrototypeProperty && namespaceSymbol && namespaceSymbol.valueDeclaration && isAssignmentDeclaration(namespaceSymbol.valueDeclaration)) { + //A prototype property assignment to something that looks class-like shouldn't actually count if the class-likeness came from an assignment declaration. + //The checker requires an actual class/constructor function to attach the prototype property to. containerIsClass = false; } if (containerIsClass && namespaceSymbol && namespaceSymbol.valueDeclaration) {