-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathtypescript.mdc
More file actions
34 lines (25 loc) · 1.07 KB
/
typescript.mdc
File metadata and controls
34 lines (25 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
---
description: "TypeScript conventions for the Delivery SDK src and tooling"
globs:
- "src/**/*.ts"
- "config/**/*.ts"
- "jest.config.ts"
- "jest.config.browser.ts"
- "jest.setup.ts"
- "jest.setup.browser.ts"
- "rollup.config.js"
alwaysApply: false
---
# TypeScript — `@contentstack/delivery-sdk`
## Layout
- **`src/stack/`** — **`stack()`** factory and **Stack** implementation.
- **`src/query/`**, **`src/entries/`**, **`src/assets/`**, **`src/sync/`**, **`src/cache/`** — feature modules.
- **`src/common/types.ts`** — **`StackConfig`**, **Region**, plugins, cache policies, etc.
## Style
- Follow **`.eslintrc.json`** and existing naming (including eslint disables only where already established, e.g. **stack** factory export).
## Imports
- **`@contentstack/core`** — **`httpClient`**, retry handlers.
- **`@contentstack/utils`** — re-exported from **`contentstack.ts`** where applicable.
- **`axios`** types for headers where needed.
## Security
- Do not log **delivery tokens**, **preview tokens**, or **api keys**; use existing error and debug patterns.