Skip to content

langium-zod / InterfaceTypeLike

Interface: InterfaceTypeLike

Defined in: types.ts:150

Duck-typed representation of a Langium InterfaceType, carrying only the fields that langium-zod needs. Using this abstraction instead of Langium's concrete class keeps the extractor decoupled from Langium's internal AST model and makes unit testing easier via plain object stubs.

Remarks

Use this interface when building synthetic AstTypesLike fixtures for unit tests or when feeding a custom grammar model into extractTypeDescriptors without going through Langium's parser. You only need to populate the fields your test exercises — properties and superTypes default to undefined and are treated as empty by the extractor.

See

AstTypesLike

Properties

PropertyTypeDescriptionDefined in
comment?stringJSDoc/grammar comment attached to this interface type, if any.types.ts:158
namestringType name as declared in the Langium grammar (e.g. "Expression").types.ts:152
properties?PropertyLike[]Properties declared directly on this interface type.types.ts:154
superTypes?string[] | Set<string>Names of super-types this interface extends, used for property inheritance.types.ts:156

Released under the MIT License.