mirror of
https://github.com/microsoft/frontend-bootcamp.git
synced 2026-01-26 14:56:42 +08:00
20 lines
277 B
TypeScript
20 lines
277 B
TypeScript
import { multiply } from './multiply';
|
|
|
|
let counter = 0;
|
|
|
|
export function getCount() {
|
|
return counter;
|
|
}
|
|
|
|
export function increment() {
|
|
return ++counter;
|
|
}
|
|
|
|
export function decrement() {
|
|
return --counter;
|
|
}
|
|
|
|
export function square(x: number) {
|
|
return multiply(x, x);
|
|
}
|