mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-18 07:29:16 -05:00
Allow to define valid static fields with names conflicting with builtin properties (#54198)
This commit is contained in:
committed by
GitHub
parent
0d262616f3
commit
1561701b9f
@@ -38334,6 +38334,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
case "length":
|
||||
case "caller":
|
||||
case "arguments":
|
||||
if (compilerOptions.useDefineForClassFields) {
|
||||
break;
|
||||
}
|
||||
// fall through
|
||||
case "prototype":
|
||||
const message = Diagnostics.Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1;
|
||||
const className = getNameOfSymbolAsWritten(getSymbolOfDeclaration(node));
|
||||
|
||||
Reference in New Issue
Block a user