Skip to content

Commit

Permalink
fix: allow @contract decorator to be applied to base contract
Browse files Browse the repository at this point in the history
  • Loading branch information
boblat committed Jan 31, 2025
1 parent 4a7ca08 commit 4eccea8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/algo-ts/src/base-contract.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { Contract } from './arc4'
import { uint64 } from './primitives'
import { ConstructorFor } from './typescript-helpers'

Expand Down Expand Up @@ -75,7 +74,7 @@ type ContractOptions = {
*/
export const ContractOptionsSymbol = Symbol('ContractOptions')
export function contract(options: ContractOptions) {
return <T extends ConstructorFor<Contract>>(contract: T, ctx: ClassDecoratorContext) => {
return <T extends ConstructorFor<BaseContract>>(contract: T, ctx: ClassDecoratorContext) => {
ctx.addInitializer(function () {
Object.defineProperty(this, ContractOptionsSymbol, {
value: options,
Expand Down

0 comments on commit 4eccea8

Please sign in to comment.