Skip to content

Commit

Permalink
pr fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bdemann committed Jan 21, 2025
1 parent 3b76b0a commit e5ccce4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/lib/stable/canister_methods/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ function isDecoratorOverloadedWithoutParams<
/**
* @internal
*
* Uses the candid string of the `init` and `postUpgrade` methods to verify that
* Uses the candid string of the `@init` and `@postUpgrade` methods to verify that
* they have matching parameter signatures.
*
* @param idlTypes - Array of IDL function types representing canister methods
Expand All @@ -365,7 +365,7 @@ function verifyInitAndPostUpgradeHaveTheSameParams(

if (aSignature !== bSignature) {
throw new Error(
`'init' and 'postUpgrade' methods must have the same parameters.\nFound:\n${aSignature}\n${bSignature}`
`'@init' and '@postUpgrade' methods must have the same parameters.\nFound:\n${aSignature}\n${bSignature}`
);
}
}
Expand All @@ -385,7 +385,7 @@ function throwIfMethodAlreadyDefined(
): void {
if (isDefined === true) {
throw new Error(
`'${methodName}' method can only have one definition in the exported canister class`
`'@${methodName}' method can only have one definition in the exported canister class`
);
}
}
2 changes: 1 addition & 1 deletion src/lib/stable/did_file/visitor/did_visitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export type VisitorData = {
isOnService: boolean;
/** Indicates if this is the first/primary service being processed */
isFirstService: boolean;
/** Collection of system functions (init, postUpgrade) to process */
/** Collection of IDL function types for \@init and \@postUpgrade methods */
initAndPostUpgradeParamIdlTypes: IDL.FuncClass[];
};

Expand Down

0 comments on commit e5ccce4

Please sign in to comment.