File tree 1 file changed +6
-9
lines changed 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change 1
1
import type { Faker } from '.' ;
2
2
3
+ /**
4
+ * Module to generate music related entries.
5
+ */
3
6
export class Music {
4
7
constructor ( private readonly faker : Faker ) {
5
8
// Bind `this` so namespaced is working correctly
@@ -9,19 +12,13 @@ export class Music {
9
12
}
10
13
this [ name ] = this [ name ] . bind ( this ) ;
11
14
}
12
-
13
- // TODO @Shinigami 92 2022-01-12: We should find a better strategy as assigning this property to a function
14
- // @ts -expect-error
15
- this . genre . schema = {
16
- description : 'Generates a genre.' ,
17
- sampleResults : [ 'Rock' , 'Metal' , 'Pop' ] ,
18
- } ;
19
15
}
20
16
21
17
/**
22
- * genre
18
+ * Returns a random music genre.
23
19
*
24
- * @method faker.music.genre
20
+ * @example
21
+ * faker.music.genre() // 'Reggae'
25
22
*/
26
23
genre ( ) : string {
27
24
return this . faker . random . arrayElement ( this . faker . definitions . music . genre ) ;
You can’t perform that action at this time.
0 commit comments