Skip to content

Commit 17fea6c

Browse files
author
Andrew Koroluk
committed
feat(gen): add functions for adding TS public/private keywords
1 parent 46a8456 commit 17fea6c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Diff for: src/generators/generator-base.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,19 @@ export class Base extends YoBase {
4949
to() {
5050
return this.filters.expect ? ').to' : '.should';
5151
}
52+
53+
public() {
54+
return this.filters.ts ? 'public ' : '';
55+
}
56+
private() {
57+
return this.filters.ts ? 'private ' : '';
58+
}
5259
}
5360

5461
export class NamedBase extends Base {
5562
constructor(...args) {
5663
super(...args);
57-
64+
5865
this.argument('name', { type: String, required: true });
5966

6067
var name = this.name.replace(/\//g, '-');

0 commit comments

Comments
 (0)