@@ -58,7 +58,7 @@ export class Random {
5858 number (
5959 options ?: number | { min ?: number ; max ?: number ; precision ?: number }
6060 ) : number {
61- console . log (
61+ console . warn (
6262 'Deprecation Warning: faker.random.number is now located in faker.datatype.number'
6363 ) ;
6464 return this . faker . datatype . number ( options ) ;
@@ -86,7 +86,7 @@ export class Random {
8686 float (
8787 options ?: number | { min ?: number ; max ?: number ; precision ?: number }
8888 ) : number {
89- console . log (
89+ console . warn (
9090 'Deprecation Warning: faker.random.float is now located in faker.datatype.float'
9191 ) ;
9292 return this . faker . datatype . float ( options ) ;
@@ -186,7 +186,7 @@ export class Random {
186186 * @see faker.datatype.uuid()
187187 */
188188 uuid ( ) : string {
189- console . log (
189+ console . warn (
190190 'Deprecation Warning: faker.random.uuid is now located in faker.datatype.uuid'
191191 ) ;
192192 return this . faker . datatype . uuid ( ) ;
@@ -202,7 +202,7 @@ export class Random {
202202 * @see faker.datatype.boolean()
203203 */
204204 boolean ( ) : boolean {
205- console . log (
205+ console . warn (
206206 'Deprecation Warning: faker.random.boolean is now located in faker.datatype.boolean'
207207 ) ;
208208 return this . faker . datatype . boolean ( ) ;
@@ -286,7 +286,7 @@ export class Random {
286286 * @deprecated
287287 */
288288 image ( ) : string {
289- console . log (
289+ console . warn (
290290 'Deprecation Warning: faker.random.image is now located in faker.image.image'
291291 ) ;
292292 return this . faker . image . image ( ) ;
@@ -307,10 +307,11 @@ export class Random {
307307 * @method faker.random.alpha
308308 * @param options // defaults to { count: 1, upcase: false, bannedChars: [] }
309309 */
310+ // TODO @Shinigami 92 2022-02-14: Tests covered `(count, options)`, but they were never typed like that
310311 alpha (
311312 options ?:
312313 | number
313- | { count : number ; upcase ?: boolean ; bannedChars ?: string [ ] }
314+ | { count ? : number ; upcase ?: boolean ; bannedChars ?: string [ ] }
314315 ) : string {
315316 if ( typeof options === 'undefined' ) {
316317 options = {
@@ -446,7 +447,7 @@ export class Random {
446447 * @deprecated
447448 */
448449 hexaDecimal ( count ?: number ) : string {
449- console . log (
450+ console . warn (
450451 'Deprecation Warning: faker.random.hexaDecimal is now located in faker.datatype.hexaDecimal'
451452 ) ;
452453 return this . faker . datatype . hexaDecimal ( count ) ;
0 commit comments