mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-12-05 07:43:49 +01:00
order conumables
This commit is contained in:
5 files changed
+37
-2
No files matched your search
@@ -31,6 +31,7 @@ Pages that are not migrated yet are named `_index.astro` so Astro skips them. Mi
|
||||
- No return type annotations. Put `satisfies Type` on the returned expression instead.
|
||||
- Wrap functions defined inside React components in `useCallback`.
|
||||
- Never inline a complex type (a union of object shapes, etc.) in a signature; name it as an interface or type.
|
||||
- A lookup table that is read by key and checked for missing keys is a `Map`, not an object literal.
|
||||
- Use a string `enum` (`Page = "page"`) instead of a union of string literals (`"page" | "dialog"`) whenever the values can be enumerated.
|
||||
- In object literals, `...spread` entries come first, each on its own line, followed by a blank line, then the custom entries. A single-line object with a spread becomes multi-line.
|
||||
- When an object literal's values are long expressions, compute them first into `const`s named after their keys, then build the object with shorthand (`{ name, color, tanks: [] }`). Short values stay inline.
|
||||
|
||||
Reference in new issue
Block a user