@@ -8,20 +8,20 @@ import type {
88 CompilationResult ,
99 LanguageTarget ,
1010} from '../../src/compute-engine/compilation/types' ;
11- import type { BoxedExpression , LibraryDefinition } from '../../src/compute-engine/global-types' ;
11+ import type { Expression , LibraryDefinition } from '../../src/compute-engine/global-types' ;
1212
13- class ContractTarget implements LanguageTarget < BoxedExpression > {
13+ class ContractTarget implements LanguageTarget < Expression > {
1414 getOperators ( ) : CompiledOperators {
1515 return { Add : [ '+' , 11 ] } ;
1616 }
1717
18- getFunctions ( ) : CompiledFunctions < BoxedExpression > {
18+ getFunctions ( ) : CompiledFunctions < Expression > {
1919 return { } ;
2020 }
2121
2222 createTarget (
23- options : Partial < CompileTarget < BoxedExpression > > = { }
24- ) : CompileTarget < BoxedExpression > {
23+ options : Partial < CompileTarget < Expression > > = { }
24+ ) : CompileTarget < Expression > {
2525 const ops = this . getOperators ( ) ;
2626 const fns = this . getFunctions ( ) ;
2727 return {
@@ -38,7 +38,7 @@ class ContractTarget implements LanguageTarget<BoxedExpression> {
3838 } ;
3939 }
4040
41- compile ( expr : BoxedExpression ) : CompilationResult {
41+ compile ( expr : Expression ) : CompilationResult {
4242 const { BaseCompiler } = require ( '../../src/compute-engine/compilation/base-compiler' ) ;
4343 return {
4444 target : 'contract' ,
@@ -105,7 +105,7 @@ describe('Extension Contracts', () => {
105105 number : ( n : number ) => String ( n ) ,
106106 preamble : '' ,
107107 indent : 0 ,
108- } as unknown as CompileTarget < BoxedExpression > ;
108+ } as unknown as CompileTarget < Expression > ;
109109
110110 expect ( ( ) => compile ( expr , { target : invalidTarget } ) ) . toThrow ( / " w s \( \) " / ) ;
111111 } ) ;
@@ -141,7 +141,7 @@ describe('Extension Contracts', () => {
141141
142142 test ( 'rejects target objects that do not implement LanguageTarget' , ( ) => {
143143 const ce = new ComputeEngine ( ) ;
144- const invalidTarget = { } as unknown as LanguageTarget < BoxedExpression > ;
144+ const invalidTarget = { } as unknown as LanguageTarget < Expression > ;
145145
146146 expect ( ( ) =>
147147 ce . registerCompilationTarget ( 'broken-target' , invalidTarget )
@@ -246,15 +246,15 @@ describe('Extension Contracts', () => {
246246 const rules = ce . rules ( [
247247 {
248248 match : 'x' ,
249- replace : ( ) => 'not-an-expression' as unknown as BoxedExpression ,
249+ replace : ( ) => 'not-an-expression' as unknown as Expression ,
250250 } ,
251251 ] ) ;
252252
253253 const expr = ce . parse ( 'x' ) ;
254254 const rule = rules . rules [ 0 ] ;
255255
256256 expect ( ( ) => applyRule ( rule , expr , { } ) ) . toThrow (
257- / e x p e c t e d a B o x e d E x p r e s s i o n o r R u l e S t e p /
257+ / e x p e c t e d a E x p r e s s i o n o r R u l e S t e p /
258258 ) ;
259259 } ) ;
260260 } ) ;
0 commit comments