@@ -35,13 +35,13 @@ Load alongside `style` and `philosophy` when writing or reviewing TS.
3535
3636Language-general naming lives in ` style ` . TS-specific suffixes:
3737
38- | Pattern | Use | Example |
39- | ------- | --- | ------- |
40- | ` PascalCase ` | Types, interfaces | ` RequestConfig ` |
41- | ` *Args ` / ` *Opts ` | Function arguments | ` CreateHandlerOpts ` |
42- | ` *Response ` | API / handler results | ` SettleResponse ` |
43- | ` create* ` | Factories | ` createClient ` |
44- | ` is* ` | Type predicates / booleans | ` isValidationError ` |
38+ | Pattern | Use | Example |
39+ | ----------------- | -------------------------- | ------------ ------- |
40+ | ` PascalCase ` | Types, interfaces | ` RequestConfig ` |
41+ | ` *Args ` / ` *Opts ` | Function arguments | ` CreateHandlerOpts ` |
42+ | ` *Response ` | API / handler results | ` SettleResponse ` |
43+ | ` create* ` | Factories | ` createClient ` |
44+ | ` is* ` | Type predicates / booleans | ` isValidationError ` |
4545
4646Acronyms keep their natural case in types and values (` JSONSchema ` , ` getURL ` , ` parseHTTPHeaders ` ). ` ID ` is an abbreviation → ` userId ` , ` getId() ` .
4747
@@ -157,7 +157,9 @@ Named exports only. Prefer `create*` factories returning objects with methods ov
157157``` typescript
158158export function createMiddleware(args : CreateMiddlewareArgs ) {
159159 return {
160- handle : async (req : Request ) => { /* ... */ },
160+ handle : async (req : Request ) => {
161+ /* ... */
162+ },
161163 };
162164}
163165```
0 commit comments