@toolcog/compiler
Toolcog compiler
References
default
Renames and re-exports toolcogTransformer
Interfaces
ToolcogTransformerConfig
Properties
contextToolsImport?
optional
contextToolsImport:false
| [string
,string
]
Defined in
embedderImport?
optional
embedderImport: [string
,string
]
Defined in
generatorImport?
optional
generatorImport: [string
,string
]
Defined in
idiomResolverImport?
optional
idiomResolverImport: [string
,string
]
Defined in
indexerImport?
optional
indexerImport: [string
,string
]
Defined in
keepIntrinsicImports?
optional
keepIntrinsicImports:boolean
Defined in
manifestFile?
optional
manifestFile:string
Defined in
standalone?
optional
standalone:boolean
Defined in
Variables
inventoryDeclarationsModuleName
const
inventoryDeclarationsModuleName:"toolcog-inventory.d.ts"
="toolcog-inventory.d.ts"
Defined in
inventoryModuleName
const
inventoryModuleName:"toolcog-inventory.js"
="toolcog-inventory.js"
Defined in
Functions
callSiteToSchema()
callSiteToSchema(
ts
,checker
,addDiagnostic
,argumentsExpression
,returnType
,name
,comment
,errorNode
):FunctionSchema
Parameters
• ts: __module
• checker: TypeChecker
• addDiagnostic
• argumentsExpression: undefined
| Expression
• returnType: undefined
| Type
• name: undefined
| string
• comment: undefined
| Comment
• errorNode: undefined
| Node
Returns
Defined in
createInventoryDeclarationsModule()
createInventoryDeclarationsModule(
ts
,factory
,moduleName
):SourceFile
Parameters
• ts: __module
• factory: NodeFactory
• moduleName: string
Returns
SourceFile
Defined in
createInventoryModule()
createInventoryModule(
ts
,factory
,inventory
):SourceFile
Parameters
• ts: __module
• factory: NodeFactory
• inventory: Inventory
<Float32Array
>
Returns
SourceFile
Defined in
defineIdiomExpression()
defineIdiomExpression(
ts
,host
,program
,factory
,checker
,addDiagnostic
,moduleDef
,idiomType
,idiomResolverExpression
,valueExpression
,valueType
,errorNode
,idiomIds
?):Expression
Parameters
• ts: __module
• host: ModuleResolutionHost
• program: Program
• factory: NodeFactory
• checker: TypeChecker
• addDiagnostic
• moduleDef: ModuleDef
• idiomType: Type
• idiomResolverExpression: undefined
| Expression
• valueExpression: Expression
• valueType: Type
• errorNode: Node
• idiomIds?: string
[]
Returns
Expression
Defined in
defineIdiomsExpression()
defineIdiomsExpression(
ts
,host
,program
,factory
,checker
,addDiagnostic
,moduleDef
,idiomType
,idiomsType
,idiomResolverExpression
,valuesExpression
,valuesType
,errorNode
,idiomIds
?):Expression
Parameters
• ts: __module
• host: ModuleResolutionHost
• program: Program
• factory: NodeFactory
• checker: TypeChecker
• addDiagnostic
• moduleDef: ModuleDef
• idiomType: Type
• idiomsType: Type
• idiomResolverExpression: undefined
| Expression
• valuesExpression: Expression
• valuesType: Type
• errorNode: Node
• idiomIds?: string
[]
Returns
Expression
Defined in
defineIndexExpression()
defineIndexExpression(
ts
,host
,program
,factory
,checker
,addDiagnostic
,moduleDef
,idiomType
,idiomsType
,idiomResolverExpression
,embedderExpression
,indexerExpression
,callExpression
):Expression
Parameters
• ts: __module
• host: ModuleResolutionHost
• program: Program
• factory: NodeFactory
• checker: TypeChecker
• addDiagnostic
• moduleDef: ModuleDef
• idiomType: Type
• idiomsType: Type
• idiomResolverExpression: undefined
| Expression
• embedderExpression: Expression
• indexerExpression: Expression
• callExpression: CallExpression
Returns
Expression
Defined in
definePromptExpression()
definePromptExpression(
ts
,host
,program
,factory
,checker
,addDiagnostic
,moduleDef
,generatorExpression
,contextToolsExpression
,callExpression
):Expression
Parameters
• ts: __module
• host: ModuleResolutionHost
• program: Program
• factory: NodeFactory
• checker: TypeChecker
• addDiagnostic
• moduleDef: ModuleDef
• generatorExpression: Expression
• contextToolsExpression: undefined
| Expression
• callExpression: CallExpression
Returns
Expression
Defined in
intrinsics/define-prompt.ts:10
defineToolExpression()
defineToolExpression(
ts
,host
,program
,factory
,checker
,addDiagnostic
,moduleDef
,toolType
,funcExpression
,funcType
,errorNode
):Expression
Parameters
• ts: __module
• host: ModuleResolutionHost
• program: Program
• factory: NodeFactory
• checker: TypeChecker
• addDiagnostic
• moduleDef: ModuleDef
• toolType: Type
• funcExpression: Expression
• funcType: Type
• errorNode: Node
Returns
Expression
Defined in
defineToolsExpression()
defineToolsExpression(
ts
,host
,program
,factory
,checker
,addDiagnostic
,moduleDef
,toolType
,toolsType
,funcsExpression
,funcsType
,errorNode
):Expression
Parameters
• ts: __module
• host: ModuleResolutionHost
• program: Program
• factory: NodeFactory
• checker: TypeChecker
• addDiagnostic
• moduleDef: ModuleDef
• toolType: Type
• toolsType: Type
• funcsExpression: Expression
• funcsType: Type
• errorNode: Node
Returns
Expression
Defined in
promptExpression()
promptExpression(
ts
,host
,program
,factory
,checker
,addDiagnostic
,moduleDef
,generatorExpression
,contextToolsExpression
,callExpression
):Expression
Parameters
• ts: __module
• host: ModuleResolutionHost
• program: Program
• factory: NodeFactory
• checker: TypeChecker
• addDiagnostic
• moduleDef: ModuleDef
• generatorExpression: Expression
• contextToolsExpression: undefined
| Expression
• callExpression: CallExpression
Returns
Expression
Defined in
signatureToSchema()
signatureToSchema(
ts
,checker
,addDiagnostic
,signature
,name
,comment
,errorNode
):FunctionSchema
Parameters
• ts: __module
• checker: TypeChecker
• addDiagnostic
• signature: Signature
• name: undefined
| string
• comment: undefined
| Comment
• errorNode: undefined
| Node
Returns
Defined in
toolcogTransformer()
toolcogTransformer(
program
,config
?,extras
?,host
?):TransformerFactory
<SourceFile
>
Parameters
• program: Program
• config?: ToolcogTransformerConfig
• extras?
• extras.addDiagnostic?
• extras.ts?: __module
• host?: ModuleResolutionHost
& object
Returns
TransformerFactory
<SourceFile
>
Defined in
transformToolcog()
transformToolcog(
ts
,context
,host
,program
,addDiagnostic
,config
):Transformer
<SourceFile
>
Parameters
• ts: __module
• context: TransformationContext
• host: ModuleResolutionHost
& object
• program: Program
• addDiagnostic
• config: undefined
| ToolcogTransformerConfig
Returns
Transformer
<SourceFile
>
Defined in
typeToSchema()
typeToSchema(
ts
,checker
,addDiagnostic
,type
,description
,propertyDescriptions
,errorNode
):Schema
Parameters
• ts: __module
• checker: TypeChecker
• addDiagnostic
• type: Type
• description: undefined
| null
| string
• propertyDescriptions: undefined
| Record
<string
, string
>
• errorNode: undefined
| Node