Просмотр исходного кода

[Docs] Update firebase-api-guidelines.md (#14360)

Nick Cooke 1 год назад
Родитель
Сommit
ca51b03c26
1 измененных файлов с 8 добавлено и 0 удалено
  1. 8 0
      docs/firebase-api-guidelines.md

+ 8 - 0
docs/firebase-api-guidelines.md

@@ -54,6 +54,14 @@ introduces strict concurrency checking and enforces Sendable types in
 asynchronous code. If applicable, new APIs should be Sendable and designed to be
 used in an async context (e.g. `Task`).
 
+### Access Control
+
+New Swift APIs should use the `public` access level over `open`. The `open`
+access level allows for subclasses to override the API.
+
+Additionally, new Swift classes should be `final` to prevent clients from
+subclassing, unless otherwise justified.
+
 ### API Availability
 
 By design, an API may not be available on a given Apple platform. Swift supports