-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reorganize from() to clone the object
Each type's from() method now calls a new abstract operation, ToFooRecord, which takes a property bag (which can be the actual type) and returns a Record with the appropriate slots. If the argument isn't an object, then from() calls ParseFooString directly. We delete the FooFromString operations, and in most cases the ToFoo operations unless there is a method somewhere in the API that actually needs the casting behaviour (including returning the original object if it's of the correct type.) Reorganizes the abstract operations in the polyfill to match the abstract operations in the spec a bit more. Effectively, this makes Temporal.Foo.from(aFoo) clone the object instead of returning the same object. Closes: #232.
- Loading branch information
Showing
25 changed files
with
489 additions
and
320 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.