typir
Version:
General purpose type checking library
29 lines • 1.36 kB
TypeScript
/******************************************************************************
* Copyright 2024 TypeFox GmbH
* This program and the accompanying materials are made available under the
* terms of the MIT License, which is available in the project root.
******************************************************************************/
/**
* Typir provides a default set of Kinds, e.g. primitive types and class types.
* For domain-specific kinds, implement this interface or create a new sub-class of an existing kind-class.
*
* Purposes of Kinds:
* - Factory to create new types
* - implements a chaining API to configure types to create
* - Entry point for ensuring, that the same type is added only once in the type graph
*
* Note that types must be created by their corresponding Kind, e.g. FunctionTypes must be created by the FunctionKind.
* It might or might not work to manually create types, e.g. by calling "new FunctionType(...)",
* since this case is no intended use case and this case is not considered during the design and implementation of Typir.
*/
export interface Kind {
readonly $name: string;
}
/**
* Options which are relevant for all kinds.
*/
export interface KindOptions {
/** Customize the name which is used to register the kind in the kind registry. */
$name: string;
}
//# sourceMappingURL=kind.d.ts.map