mirror of
https://github.com/apple/pkl.git
synced 2026-07-04 20:21:42 +02:00
Apply suggested update to note on amending types
This commit is contained in:
committed by
Philip K.F. Hölzenspies
parent
7d9603afd7
commit
f2470f3e85
@@ -60,7 +60,10 @@ parrot {
|
|||||||
|
|
||||||
[NOTE]
|
[NOTE]
|
||||||
====
|
====
|
||||||
So far, we have only worked with link:{uri-stdlib-Dynamic}[Dynamic] objects. The other type available to us is link:{uri-stdlib-Typed}[Typed] objects. _Amending_ allows us to override, amend, and add new properties to a dynamic object, but a typed object will only let us amend or override existing properties, not add entirely new ones.
|
So far, you have only worked with link:{uri-stdlib-Dynamic}[Dynamic] objects.
|
||||||
|
Pkl also offers link:{uri-stdlib-Typed}[Typed] objects.
|
||||||
|
_Amending_ allows you to override, amend, and add new properties to a dynamic object.
|
||||||
|
Typed objects will only let you amend or override existing properties, not add entirely new ones.
|
||||||
The xref:03_writing_a_template.adoc[next part of the tutorial] discusses types in more detail.
|
The xref:03_writing_a_template.adoc[next part of the tutorial] discusses types in more detail.
|
||||||
There, you see that amending _never changes the type_ of the object.
|
There, you see that amending _never changes the type_ of the object.
|
||||||
====
|
====
|
||||||
|
|||||||
Reference in New Issue
Block a user