You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/docs/contributing/api-modelling.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,7 +63,7 @@ When naming an overloaded function, we can use the `With` suffix to indicate tha
63
63
Constructors follow a different naming rule than methods.
64
64
65
65
- Keep singleton constructors named `make`.
66
-
- Keep true default constructors named `make`, even when the constructor family also has typed overloads.
66
+
- Keep true no-argument default constructors named `make`, even when the constructor family also has typed overloads.
67
67
- When a constructor family does not have a default constructor, use `from*` names for every overload, including the first one.
68
68
- Base `from*` names on the source input type: `fromString`, `fromArrayBuffer`, `fromMediaStream`, `fromURLWithProtocols`, and so on.
69
69
- If an optional labeled argument hides a real default constructor, split that binding into `make()` plus typed `from*` overloads instead of keeping the optional argument on `make`.
0 commit comments