jsii-pacmak
Version: 
A code generation framework for jsii backend languages
19 lines • 940 B
TypeScript
import * as spec from '@jsii/spec';
export interface TypeReferenceVisitor<A = void> {
    named(ref: spec.NamedTypeReference): A;
    primitive(ref: spec.PrimitiveTypeReference): A;
    collection(ref: spec.CollectionTypeReference): A;
    union(ref: spec.UnionTypeReference): A;
    intersection(ref: spec.IntersectionTypeReference): A;
}
export declare function visitTypeReference<A>(typeRef: spec.TypeReference, visitor: TypeReferenceVisitor<A>): A;
export interface TypeVisitor<A = void> {
    classType(t: spec.ClassType): A;
    interfaceType(t: spec.InterfaceType): A;
    dataType(t: spec.InterfaceType): A;
    enumType(t: spec.EnumType): A;
}
export declare function visitType<A>(t: spec.Type, visitor: TypeVisitor<A>): A;
export declare function isDataType(t: spec.Type): t is spec.InterfaceType;
export declare function isBehavioralInterfaceType(t: spec.Type): t is spec.InterfaceType;
//# sourceMappingURL=type-visitor.d.ts.map