# SaC Facade API

SaC help does not duplicate the full Facade API reference. Project-enabled packages include local `project/types/*.d.ts` files generated from the CLI runtime SDK; use them as the authoring reference for method names, overloads, enum names, and data shapes.

## Local Types

A sheet migration `apply` function receives a bounded context:

```typescript
apply({ workbook, sheet, univerAPI }) {
  sheet.getRange("A1").setValue("ready");
}
```

- `sheet` is the declared primary sheet, resolved or created before `apply` runs.
- `workbook` is the active workbook facade.
- `univerAPI` is available for Facade APIs that are not sheet-local.

```bash
rg "class FRange|setFormula|setValues" project/types
rg "interface ICellData|enum BorderType" project/types
pnpm exec tsc -p tsconfig.json --pretty false
```

Use only APIs present in local `project/types/*.d.ts`. Do not guess Facade method names, and do not hand-write local ambient declarations or shim files for Facade or `univer:sac/*` helpers.

If a public Facade API or type is missing from the generated assets, treat it as a CLI type asset gap instead of patching the SaC project with private declarations.
