You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 8, 2020. It is now read-only.
Copy file name to clipboardExpand all lines: packages/composer-common/lib/readonlydecorator.js
+2-15Lines changed: 2 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -40,22 +40,9 @@ class ReadOnlyDecorator extends Decorator {
40
40
process(){
41
41
super.process();
42
42
constargs=this.getArguments();
43
-
if(args.length!==1){
44
-
thrownewIllegalModelException(`@readonly decorator expects 1 argument, but ${args.length} arguments were specified.`,this.parent.getModelFile(),this.ast.location);
43
+
if(args.length!==0){
44
+
thrownewIllegalModelException(`@readonly decorator expects 0 arguments, but ${args.length} arguments were specified.`,this.parent.getModelFile(),this.ast.location);
45
45
}
46
-
constarg=args[0];
47
-
if(typeofarg!=='boolean'){
48
-
thrownewIllegalModelException(`@readonly decorator expects a boolean argument, but an argument of type ${typeofarg} was specified.`,this.parent.getModelFile(),this.ast.location);
49
-
}
50
-
this.value=arg;
51
-
}
52
-
53
-
/**
54
-
* Get the value of this commit decorator.
55
-
* @return {boolean} The value of this commit decorator.
0 commit comments