aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/random.ts15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/random.ts b/src/random.ts
index f3d11f3a..f3c4ffd1 100644
--- a/src/random.ts
+++ b/src/random.ts
@@ -58,7 +58,7 @@ export class Random {
number(
options?: number | { min?: number; max?: number; precision?: number }
): number {
- console.log(
+ console.warn(
'Deprecation Warning: faker.random.number is now located in faker.datatype.number'
);
return this.faker.datatype.number(options);
@@ -86,7 +86,7 @@ export class Random {
float(
options?: number | { min?: number; max?: number; precision?: number }
): number {
- console.log(
+ console.warn(
'Deprecation Warning: faker.random.float is now located in faker.datatype.float'
);
return this.faker.datatype.float(options);
@@ -186,7 +186,7 @@ export class Random {
* @see faker.datatype.uuid()
*/
uuid(): string {
- console.log(
+ console.warn(
'Deprecation Warning: faker.random.uuid is now located in faker.datatype.uuid'
);
return this.faker.datatype.uuid();
@@ -202,7 +202,7 @@ export class Random {
* @see faker.datatype.boolean()
*/
boolean(): boolean {
- console.log(
+ console.warn(
'Deprecation Warning: faker.random.boolean is now located in faker.datatype.boolean'
);
return this.faker.datatype.boolean();
@@ -291,7 +291,7 @@ export class Random {
* @deprecated
*/
image(): string {
- console.log(
+ console.warn(
'Deprecation Warning: faker.random.image is now located in faker.image.image'
);
return this.faker.image.image();
@@ -316,10 +316,11 @@ export class Random {
* @method faker.random.alpha
* @param options // defaults to { count: 1, upcase: false, bannedChars: [] }
*/
+ // TODO @Shinigami92 2022-02-14: Tests covered `(count, options)`, but they were never typed like that
alpha(
options?:
| number
- | { count: number; upcase?: boolean; bannedChars?: string[] }
+ | { count?: number; upcase?: boolean; bannedChars?: string[] }
): string {
if (typeof options === 'undefined') {
options = {
@@ -455,7 +456,7 @@ export class Random {
* @deprecated
*/
hexaDecimal(count?: number): string {
- console.log(
+ console.warn(
'Deprecation Warning: faker.random.hexaDecimal is now located in faker.datatype.hexaDecimal'
);
return this.faker.datatype.hexaDecimal(count);