@neocompose/cli 0.89.7 → 0.89.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/neo-runtime.mjs +316 -223
- package/dist/test-worker.mjs +146 -219
- package/package.json +1 -1
- package/skills/neocompose-cli/SKILL.md +1 -1
- package/skills/neocompose-cli/references/cli-development.md +6 -1
- package/skills/neocompose-cli/references/declarations/constructors.md +4 -0
- package/skills/neocompose-cli/references/declarations/initializers.md +9 -0
- package/skills/neocompose-cli/references/neoscript/collections.md +9 -1
|
@@ -3,6 +3,11 @@
|
|
|
3
3
|
Member defaults: what they may read, when they compute, generic and
|
|
4
4
|
Immutable construction, and edits to stored constructions.
|
|
5
5
|
|
|
6
|
+
Object initializer fields indent one level below the construction's header,
|
|
7
|
+
including inside call arguments. The opening brace may be on the header line
|
|
8
|
+
or the following line. Multiline argument lists retain their continuation
|
|
9
|
+
indentation, using the project's configured spaces or tabs.
|
|
10
|
+
|
|
6
11
|
## Initializer scope
|
|
7
12
|
|
|
8
13
|
- Field initializers may read their class's static members unqualified,
|
|
@@ -28,6 +33,10 @@ Immutable construction, and edits to stored constructions.
|
|
|
28
33
|
|
|
29
34
|
## Computed initializers
|
|
30
35
|
|
|
36
|
+
The editor checks computed defaults with the same expression resolver as push.
|
|
37
|
+
Unknown names, missing members, invalid type arguments, and expression type
|
|
38
|
+
errors appear at the offending initializer expression, including nested defaults.
|
|
39
|
+
|
|
31
40
|
A default that isn't a closed literal stores as a computed initializer and
|
|
32
41
|
replays for omitted members in push, web, and SDK. A stored override stays
|
|
33
42
|
pinned until reset.
|
|
@@ -4,6 +4,10 @@ Queries and mutations on `List`, `Set`, and `Dictionary` values. Collection
|
|
|
4
4
|
declarations and storage live in
|
|
5
5
|
[member kinds](../declarations/member-kinds.md).
|
|
6
6
|
|
|
7
|
+
Collections have no constructors. Initialize List and Set members with `[]`
|
|
8
|
+
and Dictionary members with `{}`, including static members. Writing `new()`
|
|
9
|
+
reports an editor diagnostic with the appropriate empty literal before push.
|
|
10
|
+
|
|
7
11
|
## Counting and matching
|
|
8
12
|
|
|
9
13
|
- `items.Count` and `items.Count()` give the size; `items.Count(pred)` counts
|
|
@@ -43,7 +47,9 @@ return this.Beds
|
|
|
43
47
|
snapshot through a writable alias makes `ThenBy` throw until a new `OrderBy`.
|
|
44
48
|
- Negative skip/take counts behave as zero.
|
|
45
49
|
- Read-only results keep entry identity and grant no extra write access to
|
|
46
|
-
entries.
|
|
50
|
+
entries. Declared index lookups (`items.Index.Name[key]`) preserve the source
|
|
51
|
+
entries' write permissions: writable fields can be updated through unique
|
|
52
|
+
results or a bucket's entries, while bucket membership stays read-only.
|
|
47
53
|
|
|
48
54
|
## Reductions
|
|
49
55
|
|
|
@@ -69,6 +75,8 @@ return this.Beds
|
|
|
69
75
|
|
|
70
76
|
These apply to writable collections and are statements:
|
|
71
77
|
|
|
78
|
+
- String-keyed dictionaries accept any string, including `__proto__` and
|
|
79
|
+
`constructor`, in both indexed assignment and `Add(key, value)`.
|
|
72
80
|
- `items.Add(value)` appends an entry. An aggregate already owned by another
|
|
73
81
|
entry or field can't be added again. Add a new value, or `Clone()` a class
|
|
74
82
|
instance.
|