docs(core): fix typo in decorators.ts relating to the use of Object.defineProperty. (#37369)

Previously there was a typo in a comment within the PropDecorator function relating to and justifying the use of Object.defineProperty. This PR clears up the wording that comment

PR Close #37369
This commit is contained in:
AleksanderBodurri 2020-05-31 23:08:32 -04:00 committed by Matias Niemelä
parent 3b52f7066b
commit c3651cec0b
1 changed files with 2 additions and 2 deletions

View File

@ -153,8 +153,8 @@ export function makePropDecorator(
function PropDecorator(target: any, name: string) {
const constructor = target.constructor;
// Use of Object.defineProperty is important since it creates non-enumerable property which
// prevents the property is copied during subclassing.
// Use of Object.defineProperty is important because it creates a non-enumerable property
// which prevents the property from being copied during subclassing.
const meta = constructor.hasOwnProperty(PROP_METADATA) ?
(constructor as any)[PROP_METADATA] :
Object.defineProperty(constructor, PROP_METADATA, {value: {}})[PROP_METADATA];