Skip to content

Commit 7411ec0

Browse files
committed
chore: clean some jsdoc
1 parent 24986e1 commit 7411ec0

File tree

12 files changed

+56
-95
lines changed

12 files changed

+56
-95
lines changed

src/address.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ export class Address {
3030
* @param format The optional format used to generate the the zip code.
3131
* By default, a random format is used from the locale zip formats.
3232
*
33+
* @see faker.helpers.replaceSymbols()
34+
*
3335
* @example
3436
* faker.address.zipCode() // '17839'
3537
* faker.address.zipCode('####') // '6925'
3638
*
37-
* @see
38-
* faker.helpers.replaceSymbols()
3939
*/
4040
zipCode(format?: string): string {
4141
// if zip format is not specified, use the zip format defined for the locale

src/company.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export class Company {
3232

3333
/**
3434
* Generates a random company name.
35+
*
3536
* @param format The optional format index used to select a format.
3637
*
3738
* @example

src/date.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ export class _Date {
2020
* @param years The range of years the date may be in the past. Defaults to `1`.
2121
* @param refDate The date to use as reference point for the newly generated date. Defaults to now.
2222
*
23+
* @see faker.date.recent()
24+
*
2325
* @example
2426
* faker.date.past() // '2021-12-03T05:40:44.408Z'
2527
* faker.date.past(10) // '2017-10-25T21:34:19.488Z'
2628
* faker.date.past(10, '2020-01-01T00:00:00.000Z') // '2017-08-18T02:59:12.350Z'
27-
*
28-
* @see faker.date.recent()
2929
*/
3030
past(years?: number, refDate?: string): Date {
3131
let date = new Date();
@@ -51,12 +51,12 @@ export class _Date {
5151
* @param years The range of years the date may be in the future. Defaults to `1`.
5252
* @param refDate The date to use as reference point for the newly generated date. Defaults to now.
5353
*
54+
* @see faker.date.soon()
55+
*
5456
* @example
5557
* faker.date.future() // '2022-11-19T05:52:49.100Z'
5658
* faker.date.future(10) // '2030-11-23T09:38:28.710Z'
5759
* faker.date.future(10, '2020-01-01T00:00:00.000Z') // '2020-12-13T22:45:10.252Z'
58-
*
59-
* @see faker.date.soon()
6060
*/
6161
future(years?: number, refDate?: string): Date {
6262
let date = new Date();
@@ -135,12 +135,12 @@ export class _Date {
135135
* @param days The range of days the date may be in the past. Defaults to `1`.
136136
* @param refDate The date to use as reference point for the newly generated date. Defaults to now.
137137
*
138+
* @see faker.date.past()
139+
*
138140
* @example
139141
* faker.date.recent() // '2022-02-04T02:09:35.077Z'
140142
* faker.date.recent(10) // '2022-01-29T06:12:12.829Z'
141143
* faker.date.recent(10, '2020-01-01T00:00:00.000Z') // '2019-12-27T18:11:19.117Z'
142-
*
143-
* @see faker.date.past()
144144
*/
145145
recent(days?: number, refDate?: string): Date {
146146
let date = new Date();
@@ -166,12 +166,12 @@ export class _Date {
166166
* @param days The range of days the date may be in the future. Defaults to `1`.
167167
* @param refDate The date to use as reference point for the newly generated date. Defaults to now.
168168
*
169+
* @see faker.date.future()
170+
*
169171
* @example
170172
* faker.date.soon() // '2022-02-05T09:55:39.216Z'
171173
* faker.date.soon(10) // '2022-02-11T05:14:39.138Z'
172174
* faker.date.soon(10, '2020-01-01T00:00:00.000Z') // '2020-01-01T02:40:44.990Z'
173-
*
174-
* @see faker.date.future()
175175
*/
176176
soon(days?: number, refDate?: string): Date {
177177
let date = new Date();

src/finance.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export class Finance {
7777

7878
/**
7979
* Generates a random masked number.
80-
80+
*
8181
* @param length The length of the unmasked number. Defaults to `4`.
8282
* @param parens Whether to use surrounding parenthesis. Defaults to `true`.
8383
* @param ellipsis Whether to prefix the numbers with an ellipsis. Defaults to `true`.

src/git.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ export class Git {
4848
/**
4949
* Generates a random commit entry.
5050
*
51+
* @param options Options for the commit entry.
52+
* @param options.merge Set to `true` to generate a merge message line.
53+
*
5154
* @example
5255
* faker.git.commitEntry()
5356
* // commit fe8c38a965d13d9794eb36918cb24cebe49a45c2

src/helpers.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -452,8 +452,6 @@ export class Helpers {
452452
* @param data The data used to populate the placeholders.
453453
* This is a record where the key is the template placeholder,
454454
* whereas the value is either a string or a function suitable for `String.replace()`.
455-
*
456-
* @method faker.helpers.mustache
457455
*/
458456
mustache(
459457
str: string | undefined,

src/image_providers/lorempicsum.ts

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@ export class LoremPicsum {
44
constructor(private readonly faker: Faker) {}
55

66
/**
7-
* image
7+
* Search image from unsplash
88
*
99
* @param width
1010
* @param height
1111
* @param grayscale
1212
* @param blur 1-10
13-
* @method faker.image.lorempicsum.image
14-
* @description search image from unsplash
1513
*/
1614
image(
1715
width?: number,
@@ -23,26 +21,22 @@ export class LoremPicsum {
2321
}
2422

2523
/**
26-
* imageGrayscaled
24+
* Search grayscale image from unsplash
2725
*
2826
* @param width
2927
* @param height
3028
* @param grayscale
31-
* @method faker.image.lorempicsum.imageGrayscaled
32-
* @description search grayscale image from unsplash
3329
*/
3430
imageGrayscale(width?: number, height?: number, grayscale?: boolean): string {
3531
return this.imageUrl(width, height, grayscale);
3632
}
3733

3834
/**
39-
* imageBlurred
35+
* Search blurred image from unsplash
4036
*
4137
* @param width
4238
* @param height
4339
* @param blur 1-10
44-
* @method faker.image.lorempicsum.imageBlurred
45-
* @description search blurred image from unsplash
4640
*/
4741
imageBlurred(
4842
width?: number,
@@ -53,15 +47,13 @@ export class LoremPicsum {
5347
}
5448

5549
/**
56-
* imageRandomSeeded
50+
* Search same random image from unsplash, based on a seed
5751
*
5852
* @param width
5953
* @param height
6054
* @param grayscale
6155
* @param blur 1-10
6256
* @param seed
63-
* @method faker.image.lorempicsum.imageRandomSeeded
64-
* @description search same random image from unsplash, based on a seed
6557
*/
6658
imageRandomSeeded(
6759
width?: number,
@@ -75,8 +67,6 @@ export class LoremPicsum {
7567

7668
/**
7769
* avatar
78-
*
79-
* @method faker.image.lorempicsum.avatar
8070
*/
8171
avatar(): string {
8272
return this.faker.internet.avatar();
@@ -90,7 +80,6 @@ export class LoremPicsum {
9080
* @param grayscale
9181
* @param blur 1-10
9282
* @param seed
93-
* @method faker.image.lorempicsum.imageUrl
9483
*/
9584
imageUrl(
9685
width?: number,

src/image_providers/lorempixel.ts

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ export class Lorempixel {
99
* @param width
1010
* @param height
1111
* @param randomize
12-
* @method faker.image.lorempixel.image
1312
*/
1413
image(width?: number, height?: number, randomize?: boolean): string {
1514
const categories = [
@@ -36,8 +35,6 @@ export class Lorempixel {
3635

3736
/**
3837
* avatar
39-
*
40-
* @method faker.image.lorempixel.avatar
4138
*/
4239
avatar(): string {
4340
return this.faker.internet.avatar();
@@ -50,7 +47,6 @@ export class Lorempixel {
5047
* @param height
5148
* @param category
5249
* @param randomize
53-
* @method faker.image.lorempixel.imageUrl
5450
*/
5551
imageUrl(
5652
width?: number,
@@ -79,7 +75,6 @@ export class Lorempixel {
7975
* @param width
8076
* @param height
8177
* @param randomize
82-
* @method faker.image.lorempixel.abstract
8378
*/
8479
abstract(width?: number, height?: number, randomize?: boolean): string {
8580
return this.faker.image.lorempixel.imageUrl(
@@ -96,7 +91,6 @@ export class Lorempixel {
9691
* @param width
9792
* @param height
9893
* @param randomize
99-
* @method faker.image.lorempixel.animals
10094
*/
10195
animals(width?: number, height?: number, randomize?: boolean): string {
10296
return this.faker.image.lorempixel.imageUrl(
@@ -113,7 +107,6 @@ export class Lorempixel {
113107
* @param width
114108
* @param height
115109
* @param randomize
116-
* @method faker.image.lorempixel.business
117110
*/
118111
business(width?: number, height?: number, randomize?: boolean): string {
119112
return this.faker.image.lorempixel.imageUrl(
@@ -130,7 +123,6 @@ export class Lorempixel {
130123
* @param width
131124
* @param height
132125
* @param randomize
133-
* @method faker.image.lorempixel.cats
134126
*/
135127
cats(width?: number, height?: number, randomize?: boolean): string {
136128
return this.faker.image.lorempixel.imageUrl(
@@ -147,7 +139,6 @@ export class Lorempixel {
147139
* @param width
148140
* @param height
149141
* @param randomize
150-
* @method faker.image.lorempixel.city
151142
*/
152143
city(width?: number, height?: number, randomize?: boolean): string {
153144
return this.faker.image.lorempixel.imageUrl(
@@ -164,7 +155,6 @@ export class Lorempixel {
164155
* @param width
165156
* @param height
166157
* @param randomize
167-
* @method faker.image.lorempixel.food
168158
*/
169159
food(width?: number, height?: number, randomize?: boolean): string {
170160
return this.faker.image.lorempixel.imageUrl(
@@ -181,7 +171,6 @@ export class Lorempixel {
181171
* @param width
182172
* @param height
183173
* @param randomize
184-
* @method faker.image.lorempixel.nightlife
185174
*/
186175
nightlife(width?: number, height?: number, randomize?: boolean): string {
187176
return this.faker.image.lorempixel.imageUrl(
@@ -198,7 +187,6 @@ export class Lorempixel {
198187
* @param width
199188
* @param height
200189
* @param randomize
201-
* @method faker.image.lorempixel.fashion
202190
*/
203191
fashion(width?: number, height?: number, randomize?: boolean): string {
204192
return this.faker.image.lorempixel.imageUrl(
@@ -215,7 +203,6 @@ export class Lorempixel {
215203
* @param width
216204
* @param height
217205
* @param randomize
218-
* @method faker.image.lorempixel.people
219206
*/
220207
people(width?: number, height?: number, randomize?: boolean): string {
221208
return this.faker.image.lorempixel.imageUrl(
@@ -232,7 +219,6 @@ export class Lorempixel {
232219
* @param width
233220
* @param height
234221
* @param randomize
235-
* @method faker.image.lorempixel.nature
236222
*/
237223
nature(width?: number, height?: number, randomize?: boolean): string {
238224
return this.faker.image.lorempixel.imageUrl(
@@ -249,7 +235,6 @@ export class Lorempixel {
249235
* @param width
250236
* @param height
251237
* @param randomize
252-
* @method faker.image.lorempixel.sports
253238
*/
254239
sports(width?: number, height?: number, randomize?: boolean): string {
255240
return this.faker.image.lorempixel.imageUrl(
@@ -266,7 +251,6 @@ export class Lorempixel {
266251
* @param width
267252
* @param height
268253
* @param randomize
269-
* @method faker.image.lorempixel.technics
270254
*/
271255
technics(width?: number, height?: number, randomize?: boolean): string {
272256
return this.faker.image.lorempixel.imageUrl(
@@ -283,7 +267,6 @@ export class Lorempixel {
283267
* @param width
284268
* @param height
285269
* @param randomize
286-
* @method faker.image.lorempixel.transport
287270
*/
288271
transport(width?: number, height?: number, randomize?: boolean): string {
289272
return this.faker.image.lorempixel.imageUrl(

src/image_providers/unsplash.ts

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,18 @@ export class Unsplash {
1313
constructor(private readonly faker: Faker) {}
1414

1515
/**
16-
* image
16+
* Search image from unsplash
1717
*
1818
* @param width
1919
* @param height
2020
* @param keyword
21-
* @method faker.image.unsplash.image
22-
* @description search image from unsplash
2321
*/
2422
image(width?: number, height?: number, keyword?: string): string {
2523
return this.imageUrl(width, height, undefined, keyword);
2624
}
2725

2826
/**
2927
* avatar
30-
*
31-
* @method faker.image.unsplash.avatar
3228
*/
3329
avatar(): string {
3430
return this.faker.internet.avatar();
@@ -41,7 +37,6 @@ export class Unsplash {
4137
* @param height
4238
* @param category
4339
* @param keyword
44-
* @method faker.image.unsplash.imageUrl
4540
*/
4641
imageUrl(
4742
width?: number,
@@ -78,7 +73,6 @@ export class Unsplash {
7873
* @param width
7974
* @param height
8075
* @param keyword
81-
* @method faker.image.unsplash.food
8276
*/
8377
food(width?: number, height?: number, keyword?: string): string {
8478
return this.faker.image.unsplash.imageUrl(width, height, 'food', keyword);
@@ -90,7 +84,6 @@ export class Unsplash {
9084
* @param width
9185
* @param height
9286
* @param keyword
93-
* @method faker.image.unsplash.people
9487
*/
9588
people(width?: number, height?: number, keyword?: string): string {
9689
return this.faker.image.unsplash.imageUrl(width, height, 'people', keyword);
@@ -102,7 +95,6 @@ export class Unsplash {
10295
* @param width
10396
* @param height
10497
* @param keyword
105-
* @method faker.image.unsplash.nature
10698
*/
10799
nature(width?: number, height?: number, keyword?: string): string {
108100
return this.faker.image.unsplash.imageUrl(width, height, 'nature', keyword);
@@ -114,7 +106,6 @@ export class Unsplash {
114106
* @param width
115107
* @param height
116108
* @param keyword
117-
* @method faker.image.unsplash.technology
118109
*/
119110
technology(width?: number, height?: number, keyword?: string): string {
120111
return this.faker.image.unsplash.imageUrl(
@@ -131,7 +122,6 @@ export class Unsplash {
131122
* @param width
132123
* @param height
133124
* @param keyword
134-
* @method faker.image.unsplash.objects
135125
*/
136126
objects(width?: number, height?: number, keyword?: string): string {
137127
return this.faker.image.unsplash.imageUrl(
@@ -148,7 +138,6 @@ export class Unsplash {
148138
* @param width
149139
* @param height
150140
* @param keyword
151-
* @method faker.image.unsplash.buildings
152141
*/
153142
buildings(width?: number, height?: number, keyword?: string): string {
154143
return this.faker.image.unsplash.imageUrl(

0 commit comments

Comments
 (0)