mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Allow target-only ES decorators (#57768)
This commit is contained in:
@@ -34454,7 +34454,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
function getDecoratorArgumentCount(node: Decorator, signature: Signature) {
|
||||
return compilerOptions.experimentalDecorators ?
|
||||
getLegacyDecoratorArgumentCount(node, signature) :
|
||||
2;
|
||||
// Allow the runtime to oversupply arguments to an ES decorator as long as there's at least one parameter.
|
||||
Math.min(Math.max(getParameterCount(signature), 1), 2);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user