Skip to content

Type Errors

chant uses the TypeScript type checker, so type errors are identical to what 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 provides the same diagnostics with hover information. 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.