Type Alias ChancyInterface
ChancyInterface: (
| {
skew?: number;
type?: "random";
}
| {
skew?: number;
type: "integer" | "int";
}
| {
d?: number;
dice?: string;
n?: number;
plus?: number;
type: "dice";
}
| {
mean?: number;
skew?: number;
stddev?: number;
type: "normal" | "normal_int" | "normal_integer";
}
| {
n?: number;
type: "bates";
}
| {
n?: number;
type: "batesgaussian";
}
| {
p?: number;
type: "bernoulli";
}
| {
alpha?: number;
beta?: number;
type: "beta";
}
| {
alpha?: number;
beta?: number;
n?: number;
type: "betaBinomial";
}
| {
n?: number;
p?: number;
type: "binomial";
}
| {
mean?: number;
stddev?: number;
type: "boxMuller";
}
| {
median?: number;
scale?: number;
type: "cauchy";
}
| {
k?: number;
type: "chiSquared";
}
| {
rate?: number;
type: "exponential";
}
| {
rate?: number;
scale?: number;
shape?: number;
type: "gamma";
}
| {
mean?: number;
skew?: number;
stddev?: number;
type: "gaussian";
}
| {
lambda1?: number;
lambda2?: number;
type: "hermite";
}
| {
k?: number;
K?: number;
n?: number;
N?: number;
type: "hypergeometric";
}
| {
n?: number;
type: "irwinHall";
}
| {
alpha?: number;
beta?: number;
type: "kumaraswamy";
}
| {
mean?: number;
scale?: number;
type: "laplace";
}
| {
mean?: number;
scale?: number;
type: "logistic";
}
| {
mean?: number;
stddev?: number;
type: "logNormal";
}
| {
location?: number;
scale?: number;
shape?: number;
type: "pareto";
}
| {
lambda?: number;
type: "poisson";
}
| {
type: "rademacher";
}
| {
scale?: number;
type: "rayleigh";
}
| {
nu?: number;
type: "studentsT";
}
| {
R?: number;
type: "wignerSemicircle";
}) & {
max?: number;
min?: number;
}
Most of the properties here are used to pass on to the resepective distribution functions.
This basically takes the form:
Specifying it this way allows TypeScript to perform a sort of validation for objects and parameters passed to the chancy function, but will require a bit of maintenance on the user end.