diff --git a/tests/end_to_end/candid_rpc/class_syntax/recursion/src/recursion/index.ts b/tests/end_to_end/candid_rpc/class_syntax/recursion/src/recursion/index.ts index 6bb2dc6889..052b3ca718 100644 --- a/tests/end_to_end/candid_rpc/class_syntax/recursion/src/recursion/index.ts +++ b/tests/end_to_end/candid_rpc/class_syntax/recursion/src/recursion/index.ts @@ -1,6 +1,6 @@ import { call, IDL, Principal, query, trap, update } from 'azle'; -import { MyCanister as MyFullCanister } from '../recursive_canister'; +import { MyCanister as MyFullCanister } from '../recursive_canister/types'; // These are the types that can be recursive // Record diff --git a/tests/end_to_end/candid_rpc/class_syntax/recursion/src/recursive_canister/index.ts b/tests/end_to_end/candid_rpc/class_syntax/recursion/src/recursive_canister/index.ts index c05c70e217..67e72a38ad 100644 --- a/tests/end_to_end/candid_rpc/class_syntax/recursion/src/recursive_canister/index.ts +++ b/tests/end_to_end/candid_rpc/class_syntax/recursion/src/recursive_canister/index.ts @@ -1,15 +1,8 @@ -import { IDL, init, Principal, query } from 'azle'; +import { IDL, init, query } from 'azle'; -let myMessage = ''; +import { MyCanister } from './types'; -export const MyCanister = IDL.Rec(); -MyCanister.fill( - IDL.Service({ - myQuery: IDL.Func([MyCanister], [MyCanister], ['query']), - getMessage: IDL.Func([], [IDL.Text], ['query']) - }) -); -export type MyCanister = Principal; +let myMessage = ''; export default class { @init([IDL.Text]) diff --git a/tests/end_to_end/candid_rpc/class_syntax/recursion/src/recursive_canister/types.ts b/tests/end_to_end/candid_rpc/class_syntax/recursion/src/recursive_canister/types.ts new file mode 100644 index 0000000000..d74bb71314 --- /dev/null +++ b/tests/end_to_end/candid_rpc/class_syntax/recursion/src/recursive_canister/types.ts @@ -0,0 +1,10 @@ +import { IDL, Principal } from 'azle'; + +export const MyCanister = IDL.Rec(); +MyCanister.fill( + IDL.Service({ + myQuery: IDL.Func([MyCanister], [MyCanister], ['query']), + getMessage: IDL.Func([], [IDL.Text], ['query']) + }) +); +export type MyCanister = Principal;