@types/chance
Advanced tools
Comparing version 0.7.36 to 1.0.0
@@ -1,5 +0,6 @@ | ||
// Type definitions for Chance 0.7.4 | ||
// Type definitions for Chance 1.0.13 | ||
// Project: http://chancejs.com | ||
// Definitions by: Chris Bowdon <https://github.com/cbowdon> | ||
// Brice BERNARD <https://github.com/brikou> | ||
// Carlos Sanchez <https://github.com/cafesanu> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
@@ -14,15 +15,13 @@ | ||
type SeededChance = Chance & Seeded; | ||
interface ChanceStatic { | ||
(): Chance; | ||
(seed: Seed): SeededChance; | ||
(seed: Seed): Chance; | ||
(generator: () => any): Chance; | ||
new (): Chance; | ||
new (seed: Seed): SeededChance; | ||
new (seed: Seed): Chance; | ||
new (generator: () => any): Chance; | ||
} | ||
interface Chance { | ||
interface Chance extends Seeded { | ||
// Basics | ||
@@ -33,2 +32,3 @@ bool(opts?: Options): boolean; | ||
integer(opts?: Options): number; | ||
letter(opts?: Options): string; | ||
natural(opts?: Options): number; | ||
@@ -48,2 +48,3 @@ string(opts?: Options): string; | ||
birthday(opts?: Options): Date | string; | ||
cf(opts?: Options): string; | ||
cpf(): string; | ||
@@ -60,2 +61,5 @@ first(opts?: Options): string; | ||
// Mobile | ||
animal(opts?: Options): string; | ||
// Mobile | ||
android_id(): string; | ||
@@ -68,3 +72,5 @@ apple_token(): string; | ||
// Web | ||
avatar(opts?: Options): string; | ||
color(opts?: Options): string; | ||
company(): string; | ||
domain(opts?: Options): string; | ||
@@ -78,2 +84,3 @@ email(opts?: Options): string; | ||
klout(): string; | ||
profession(opts?: Options): string; | ||
tld(): string; | ||
@@ -113,2 +120,4 @@ twitter(): string; | ||
timestamp(): number; | ||
timezone(): Timezone; | ||
weekday(opts: Options): 'Monday' | 'Tuesday' | 'Wednesday' | 'Thursday' | 'Friday' | 'Saturday' | 'Sunday'; | ||
year(opts?: Options): string; | ||
@@ -123,2 +132,3 @@ | ||
dollar(opts?: Options): string; | ||
euro(opts?: Options): string; | ||
exp(): string; | ||
@@ -147,2 +157,3 @@ exp(opts: Options): string | CreditCardExpiration; | ||
// Miscellaneous | ||
coin(): string; | ||
d4(): number; | ||
@@ -237,9 +248,13 @@ d6(): number; | ||
} | ||
interface Timezone { | ||
name: string; | ||
abbr: string; | ||
offset: number; | ||
isdst: boolean; | ||
text: string; | ||
utc: string[]; | ||
} | ||
} | ||
// window.chance | ||
declare var chance: Chance.Chance; | ||
declare var Chance: Chance.ChanceStatic; | ||
// import Chance = require('chance'); | ||
declare module "chance" { | ||
@@ -246,0 +261,0 @@ interface ExportedChance extends Chance.ChanceStatic { |
{ | ||
"name": "@types/chance", | ||
"version": "0.7.36", | ||
"version": "1.0.0", | ||
"description": "TypeScript definitions for Chance", | ||
@@ -16,2 +16,7 @@ "license": "MIT", | ||
"githubUsername": "brikou" | ||
}, | ||
{ | ||
"name": "Carlos Sanchez", | ||
"url": "https://github.com/cafesanu", | ||
"githubUsername": "cafesanu" | ||
} | ||
@@ -26,4 +31,4 @@ ], | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "0adf63ddecc10db4262bc9441d6efa2bdbbd30f7576e0b4d5d51d81b057469ec", | ||
"typesPublisherContentHash": "24e77c6fba85256b300b403324c5ea23bc48448a7793252e560d1449a0cb7281", | ||
"typeScriptVersion": "2.0" | ||
} |
@@ -11,7 +11,7 @@ # Installation | ||
Additional Details | ||
* Last updated: Wed, 03 Jan 2018 08:47:03 GMT | ||
* Last updated: Thu, 01 Mar 2018 21:23:58 GMT | ||
* Dependencies: none | ||
* Global values: Chance, chance | ||
* Global values: none | ||
# Credits | ||
These definitions were written by Chris Bowdon <https://github.com/cbowdon>, Brice BERNARD <https://github.com/brikou>. | ||
These definitions were written by Chris Bowdon <https://github.com/cbowdon>, Brice BERNARD <https://github.com/brikou>, Carlos Sanchez <https://github.com/cafesanu>. |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
10390
229
1