# Is Ecmascript's internal PropertyDescriptor an Ecmascript language value?

**URL:** <https://es.discourse.group/t/is-ecmascripts-internal-propertydescriptor-an-ecmascript-language-value/1199>\
**Category:** I have questions\
**Created:** [February 11, 2022, 5:28pm UTC](https://es.discourse.group/t/is-ecmascripts-internal-propertydescriptor-an-ecmascript-language-value/1199 "2022-02-11T17:28:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sym233](https://yyz2.discourse-cdn.com/free1/user_avatar/es.discourse.group/sym233/32/1233_2.png) [@sym233](https://es.discourse.group/u/sym233)\
**Post date:** [February 11, 2022, 5:28pm UTC](https://es.discourse.group/t/is-ecmascripts-internal-propertydescriptor-an-ecmascript-language-value/1199/1 "2022-02-11T17:28:35Z")

</div>

I'm reading ecma 262 and trying to implement a js interpreter.

In [10.1.5 [[GetOwnProperty]] ( P )](https://tc39.es/ecma262/#sec-ordinary-object-internal-methods-and-internal-slots-getownproperty-p), this internal method should return a Property Descriptor (which is a Record),

> 2. Let D be a newly created Property Descriptor with no fields.
> 
> 8. Return D.

but as an internal method its result should be wrapped in Complete Record,

> [Object Internal Methods and Internal Slots](https://tc39.es/ecma262/#sec-ordinary-object-internal-methods-and-internal-slots)
> 
> An internal method implicitly returns a Completion Record, either a normal completion that wraps a value of the return type shown in its invocation pattern, or a throw completion.

and [Complete Record](https://tc39.es/ecma262/#table-completion-record-fields)'s [[Value]] should be an Ecmascript value or empty instead of a Record.

Is it a conflict, or Property Descriptor is an Ecmascipt value?

---

<div class="post-metadata">

**Author:** ![ljharb](https://yyz2.discourse-cdn.com/free1/user_avatar/es.discourse.group/ljharb/32/8_2.png) [@ljharb](https://es.discourse.group/u/ljharb)\
**Post date:** [February 11, 2022, 5:29pm UTC](https://es.discourse.group/t/is-ecmascripts-internal-propertydescriptor-an-ecmascript-language-value/1199/2 "2022-02-11T17:29:21Z")

</div>

No, it's not a language value.

Currently (although this will change soon) every abstract operation's return is ALWAYS wrapped in a Completion Record implicitly, and any time you treat a Completion Record like a value, it's implicitly unwrapped as well.

---

<div class="post-metadata">

**Author:** ![sym233](https://yyz2.discourse-cdn.com/free1/user_avatar/es.discourse.group/sym233/32/1233_2.png) [@sym233](https://es.discourse.group/u/sym233)\
**Post date:** [February 11, 2022, 5:54pm UTC](https://es.discourse.group/t/is-ecmascripts-internal-propertydescriptor-an-ecmascript-language-value/1199/3 "2022-02-11T17:54:57Z")

</div>

Thank you!  
So currently Complete Record can wrap everything, right?

---

<div class="post-metadata">

**Author:** ![jmdyck](https://yyz2.discourse-cdn.com/free1/user_avatar/es.discourse.group/jmdyck/32/796_2.png) [@jmdyck](https://es.discourse.group/u/jmdyck)\
**Post date:** [February 11, 2022, 6:07pm UTC](https://es.discourse.group/t/is-ecmascripts-internal-propertydescriptor-an-ecmascript-language-value/1199/4 "2022-02-11T18:07:53Z")

</div>

Not currently, which leads to the conflict you pointed out. But probably soon.

---

<div class="post-metadata">

**Author:** ![claudiameadows](https://yyz2.discourse-cdn.com/free1/user_avatar/es.discourse.group/claudiameadows/32/126_2.png) [@claudiameadows](https://es.discourse.group/u/claudiameadows)\
**Post date:** [February 14, 2022, 9:49pm UTC](https://es.discourse.group/t/is-ecmascripts-internal-propertydescriptor-an-ecmascript-language-value/1199/5 "2022-02-14T21:49:32Z")

</div>

Curious question: is there a PR or issue I can look at? I'm curious about the discussion.

---

<div class="post-metadata">

**Author:** ![ljharb](https://yyz2.discourse-cdn.com/free1/user_avatar/es.discourse.group/ljharb/32/8_2.png) [@ljharb](https://es.discourse.group/u/ljharb)\
**Post date:** [February 14, 2022, 10:07pm UTC](https://es.discourse.group/t/is-ecmascripts-internal-propertydescriptor-an-ecmascript-language-value/1199/6 "2022-02-14T22:07:26Z")

</div>

[https://github.com/tc39/ecma262/pull/2547](https://github.com/tc39/ecma262/pull/2547)
