Skip to content

Commit 45f255f

Browse files
author
Mad Sheogorath
committed
Fixed up to working state.
Some JSDoc commants added.
1 parent e72ceab commit 45f255f

9 files changed

+213
-1631
lines changed

example/generated/example-posts.generated.dart

Lines changed: 0 additions & 601 deletions
This file was deleted.

example/generated/example-posts.generated.mjs

Lines changed: 50 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ class GetAllResponsePostAuthor extends PackMeMessage {
1111
/** !string */ avatar,
1212
) {
1313
super();
14-
this.$check('id', id);
15-
this.$check('nickname', nickname);
16-
this.$check('avatar', avatar);
14+
if (arguments.length > 0) {
15+
this.$check('id', id);
16+
this.$check('nickname', nickname);
17+
this.$check('avatar', avatar);
18+
}
1719
this.id = id;
1820
this.nickname = nickname;
1921
this.avatar = avatar;
@@ -70,11 +72,13 @@ class GetAllResponsePost extends PackMeMessage {
7072
/** !Date */ posted,
7173
) {
7274
super();
73-
this.$check('id', id);
74-
this.$check('author', author);
75-
this.$check('title', title);
76-
this.$check('shortContent', shortContent);
77-
this.$check('posted', posted);
75+
if (arguments.length > 0) {
76+
this.$check('id', id);
77+
this.$check('author', author);
78+
this.$check('title', title);
79+
this.$check('shortContent', shortContent);
80+
this.$check('posted', posted);
81+
}
7882
this.id = id;
7983
this.author = author;
8084
this.title = title;
@@ -130,7 +134,9 @@ class GetAllResponse extends PackMeMessage {
130134
/** !GetAllResponsePost[] */ posts,
131135
) {
132136
super();
133-
this.$check('posts', posts);
137+
if (arguments.length > 0) {
138+
this.$check('posts', posts);
139+
}
134140
this.posts = posts;
135141
}
136142

@@ -221,9 +227,11 @@ class GetResponseAuthor extends PackMeMessage {
221227
/** ?string */ instagramId,
222228
) {
223229
super();
224-
this.$check('id', id);
225-
this.$check('nickname', nickname);
226-
this.$check('avatar', avatar);
230+
if (arguments.length > 0) {
231+
this.$check('id', id);
232+
this.$check('nickname', nickname);
233+
this.$check('avatar', avatar);
234+
}
227235
this.id = id;
228236
this.nickname = nickname;
229237
this.avatar = avatar;
@@ -303,8 +311,10 @@ class GetResponseStats extends PackMeMessage {
303311
/** !number */ dislikes,
304312
) {
305313
super();
306-
this.$check('likes', likes);
307-
this.$check('dislikes', dislikes);
314+
if (arguments.length > 0) {
315+
this.$check('likes', likes);
316+
this.$check('dislikes', dislikes);
317+
}
308318
this.likes = likes;
309319
this.dislikes = dislikes;
310320
}
@@ -345,9 +355,11 @@ class GetResponseCommentAuthor extends PackMeMessage {
345355
/** !string */ avatar,
346356
) {
347357
super();
348-
this.$check('id', id);
349-
this.$check('nickname', nickname);
350-
this.$check('avatar', avatar);
358+
if (arguments.length > 0) {
359+
this.$check('id', id);
360+
this.$check('nickname', nickname);
361+
this.$check('avatar', avatar);
362+
}
351363
this.id = id;
352364
this.nickname = nickname;
353365
this.avatar = avatar;
@@ -400,9 +412,11 @@ class GetResponseComment extends PackMeMessage {
400412
/** !Date */ posted,
401413
) {
402414
super();
403-
this.$check('author', author);
404-
this.$check('comment', comment);
405-
this.$check('posted', posted);
415+
if (arguments.length > 0) {
416+
this.$check('author', author);
417+
this.$check('comment', comment);
418+
this.$check('posted', posted);
419+
}
406420
this.author = author;
407421
this.comment = comment;
408422
this.posted = posted;
@@ -454,12 +468,14 @@ class GetResponse extends PackMeMessage {
454468
/** !GetResponseComment[] */ comments,
455469
) {
456470
super();
457-
this.$check('title', title);
458-
this.$check('content', content);
459-
this.$check('posted', posted);
460-
this.$check('author', author);
461-
this.$check('stats', stats);
462-
this.$check('comments', comments);
471+
if (arguments.length > 0) {
472+
this.$check('title', title);
473+
this.$check('content', content);
474+
this.$check('posted', posted);
475+
this.$check('author', author);
476+
this.$check('stats', stats);
477+
this.$check('comments', comments);
478+
}
463479
this.title = title;
464480
this.content = content;
465481
this.posted = posted;
@@ -521,7 +537,9 @@ class GetRequest extends PackMeMessage {
521537
/** !number[] */ postId,
522538
) {
523539
super();
524-
this.$check('postId', postId);
540+
if (arguments.length > 0) {
541+
this.$check('postId', postId);
542+
}
525543
this.postId = postId;
526544
}
527545

@@ -578,6 +596,8 @@ class DeleteResponse extends PackMeMessage {
578596
/** ?string */ error,
579597
) {
580598
super();
599+
if (arguments.length > 0) {
600+
}
581601
this.error = error;
582602
}
583603

@@ -621,7 +641,9 @@ class DeleteRequest extends PackMeMessage {
621641
/** !number[] */ postId,
622642
) {
623643
super();
624-
this.$check('postId', postId);
644+
if (arguments.length > 0) {
645+
this.$check('postId', postId);
646+
}
625647
this.postId = postId;
626648
}
627649

0 commit comments

Comments
 (0)