Skip to content

Specifcation of property descriptors of Temporal.___ is missing #1978

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ptomato opened this issue Dec 13, 2021 · 6 comments
Closed

Specifcation of property descriptors of Temporal.___ is missing #1978

ptomato opened this issue Dec 13, 2021 · 6 comments
Labels
spec-text Specification text involved

Comments

@ptomato
Copy link
Collaborator

ptomato commented Dec 13, 2021

In Section 1.2, Constructor Properties of the Temporal Object, we refer to other sections to describe the value of properties such as Temporal.Instant. However, we never specify what attributes those properties should have.

I believe it would be usual for these properties to have the attributes [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true, and there are already test262 tests that assume this.

I'm not sure whether this would be an editorial change since it is fixing an omission in the spec, or a normative change because implementations might already have made their own decision. Due to the presence of the test262 test it's probably unlikely that implementations decided something different.

@ptomato ptomato added the spec-text Specification text involved label Dec 13, 2021
@justingrant
Copy link
Collaborator

What about the attributes of static methods on Temporal types?

@ljharb
Copy link
Member

ljharb commented Dec 18, 2021

Those should have a default, like the static methods on Array and Promise etc.

@justingrant
Copy link
Collaborator

@ljharb - Could you clarify what you mean by "default"? Are you saying that there's already a default property descriptor in the 262 spec for builtin objects' static methods, and Temporal objects should use it unless noted otherwise? Or are you saying that the Temporal spec should include a default descriptor somewhere that should apply to all static methods? Or do you mean something else?

@ljharb
Copy link
Member

ljharb commented Dec 18, 2021

The former. See https://tc39.es/ecma262/#sec-ecmascript-standard-built-in-objects:

Every other data property described in clauses 19 through 28 and in Annex B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true } unless otherwise specified.

@Ms2ger
Copy link
Collaborator

Ms2ger commented Mar 10, 2022

@ljharb would you say this issue can be closed no change, then?

@ljharb
Copy link
Member

ljharb commented Mar 10, 2022

Yes.

@Ms2ger Ms2ger closed this as completed Mar 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spec-text Specification text involved
Projects
None yet
Development

No branches or pull requests

4 participants