Skip to content

Conversation

@Mikulas
Copy link

@Mikulas Mikulas commented Nov 26, 2025

If the property uses amendment syntax (block syntax), it amends the target's nested object.

**Elements**: Elements from the source object are appended to the target's element list.
Element indices are automatically offset to account for existing elements in the target.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be worth noting that this has similar semantics to the spread operation.

Element indices are automatically offset to account for existing elements in the target.

**Entries**: Entries from the source object are merged into the target's entry map.
If a key exists in both objects, the source value overrides the target value.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about amend syntax and how Int keys can interact with elements?


=== Typed Mixins

Currently, the `Mixin` type is untyped - it accepts and produces `unknown` values.
Copy link
Member

@bioball bioball Nov 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Mixin typealias has a type parameter; Mixin<Foo> is a valid mixin.

The un-paramaterized Mixin stands for Mixin<unknown>.

@HT154 HT154 changed the title SPICE-0023: toMixin SPICE-0023: Object.toMixin() Nov 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants