Skip to content

langium-zod / InterfaceTypeLike

Interface: InterfaceTypeLike ​

Defined in: types.ts:161

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:169
namestringType name as declared in the Langium grammar (e.g. "Expression").types.ts:163
properties?PropertyLike[]Properties declared directly on this interface type.types.ts:165
superTypes?string[] | Set<string>Names of super-types this interface extends, used for property inheritance.types.ts:167

Released under the MIT License.