-
Notifications
You must be signed in to change notification settings - Fork 0
@libs.calculator.CalculatorFactory
github-actions[bot] edited this page Jan 24, 2024
·
9 revisions
@libs/calculator.CalculatorFactory
A factory for creating calculators.
• new CalculatorFactory(): CalculatorFactory
▸ create(value?): Calculator
Creates a new calculator.
| Name | Type | Default value | Description |
|---|---|---|---|
value |
number |
0 |
The initial value of the calculator. |
Example
const calc = CalculatorFactory.create();
console.log(calc.value); // 0Example
const calc = CalculatorFactory.create(1);
console.log(calc.value); // 1If you want single repo example, please go to https://github.com/rhea-so/tsdoc-github-wiki-example