Type Errors
chant uses the TypeScript type checker, so type errors are identical to what your IDE shows.
Common Type Errors
Section titled “Common Type Errors”Wrong Property Type
Section titled “Wrong Property Type”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.
Missing Required Property
Section titled “Missing Required Property”src/bucket.ts:2:1 error Property 'name' is missing in type '{ acl: string; }'.Add the missing required property to the resource constructor.
Invalid Property Name
Section titled “Invalid Property Name”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.
Debugging Type Errors
Section titled “Debugging Type Errors”Your editor provides the same diagnostics with hover information. To inspect lexicon type definitions:
- Hover over a resource class and use “Go to Definition”
- Review the property types and required fields
Type Errors vs Lint Errors
Section titled “Type Errors vs Lint Errors”| Prefix | Source | Example |
|---|---|---|
TS#### | TypeScript type checker | TS2322: Type 'number' is not assignable to type 'string' |
EVL### | Evaluability lint rules | EVL001: expression not statically evaluable |
COR### | Correctness lint rules | COR008: resource declaration must be exported |
All three categories are reported by chant lint in a single pass.