Skip to content

Type Errors

llms.txt lists every page for an agent
Optional: hand this page to your coding agentThe steps work by hand too.
Show the whole prompt
Read https://intentius.io/chant/troubleshooting/type-errors/.
Run `npx chant lint` in this project and fix each `TS` error against the lexicon's type definitions: the property's type, a missing required property, or the property name's casing.
Run `npx chant build` and `npx chant lint` until both pass, and open a pull request.
Never deploy to a real cloud account or shared environment (with `chant run`, `chant components` or a platform's own CLI), approve (a pull request review, `chant approve` or `chant run approve`), override a policy denial (`chant approve policy-override`), or merge; never cut or publish a release (`chant release cut --yes` or `chant release publish`), push or delete a `ci/*` tag (`chant ci tick` pushes them), or change the value of an existing flag; never touch `.chant/allowed_signers` or `chant/lifecycle`.

chant uses the TypeScript type checker, so it reports the same type errors your IDE shows.

src/bucket.ts:3:5 error Type 'number' is not assignable to type 'string'.

A resource property has the wrong type. Check the lexicon type definitions for the expected type.

src/bucket.ts:2:1 error Property 'name' is missing in type '{ acl: string; }'.

Add the missing required property to the resource constructor.

src/bucket.ts:4:5 error Object literal may only specify known properties.

Check the property name casing. Lexicon types use the casing defined by the provider.

Your editor shows the same diagnostics on hover. To inspect lexicon type definitions:

  1. Hover over a resource class and use “Go to Definition”
  2. Review the property types and required fields
PrefixSourceExample
TS####TypeScript type checkerTS2322: Type 'number' is not assignable to type 'string'
EVL###Evaluability lint rulesEVL001: expression not statically evaluable
COR###Correctness lint rulesCOR008: resource declaration must be exported

All three categories are reported by chant lint in a single pass.

chant