Skip to content

Commit 1c64d38

Browse files
authored
Add advice about read-only lists (#292)
* Add advice about read-only lists The added recommendation is about the types of static lists to be considered for API design. Addresses #50 * Addressing CR feedback * One last nit addressed
1 parent 2f553a7 commit 1c64d38

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

index.bs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -995,6 +995,13 @@ converting {{undefined}} to the type of the parameter.
995995
For example, if a boolean parameter isn't set,
996996
it must default to false.
997997

998+
When deciding between different list data types for your API,
999+
unless otherwise required, use the following list types:
1000+
1001+
* Method list arguments should be of type [=sequence types|sequence&ltT&gt=]
1002+
* Method return values should be of type [=sequence types|sequence&ltT&gt=]
1003+
* Attributes should be of type [=observable array type|ObservableArray&ltT&gt=]
1004+
9981005
See also:
9991006

10001007
* [[#prefer-dict-to-bool]]

0 commit comments

Comments
 (0)