Skip to content

Commit

Permalink
import decorators
Browse files Browse the repository at this point in the history
  • Loading branch information
pyramation committed Oct 26, 2024
1 parent ba2c7da commit 72c38d2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
9 changes: 3 additions & 6 deletions __fixtures__/decorators/src/class.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import { BigNumber } from "jsd-std";

// Permission decorators
export const admin = (target: any, propertyKey: string, descriptor: PropertyDescriptor) => descriptor;
export const creator = (target: any, propertyKey: string, descriptor: PropertyDescriptor) => descriptor;
import { admin, creator } from '@hyperweb/decorators';
import { BigNumber } from 'jsd-std';

export interface State {
count: BigNumber;
Expand Down Expand Up @@ -30,7 +27,7 @@ export class Counter {
@creator
public decrement(amount: BigNumber): void {
if (this.state.count.lt(amount)) {
throw new Error("Count cannot be negative");
throw new Error('Count cannot be negative');
}
this.state.count = this.state.count.sub(amount);
}
Expand Down
4 changes: 0 additions & 4 deletions __output__/decorators/bundle.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions __output__/decorators/bundle.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 72c38d2

Please sign in to comment.