refactor: docs and makefile

This commit is contained in:
Ruidy 2021-02-19 16:14:38 +01:00
parent 328eef7876
commit 7f0e54b29d
3 changed files with 9 additions and 8 deletions

View file

@ -1,5 +1,5 @@
.PHONY: run
run:
deno run --watch --unstable src/index.ts
.PHONY: cli
cli:
deno run cli.ts
tests:
deno test --coverage --unstable

2
cli.ts
View file

@ -1,5 +1,5 @@
import { readLines } from "https://deno.land/std@0.87.0/io/bufio.ts";
import { ID, sayHello, sayRandomHello, ValidationError } from "./src";
import { ID, sayHello, sayRandomHello, ValidationError } from "./src/index.ts";
const start = async () => {
console.log("Hello, World! (International version)\n");

View file

@ -1,11 +1,12 @@
import { localesSize } from "../repositories/locales.ts";
import { ValidationError } from "../errors/exceptions.ts";
/**
* ID is the input type.
* It validates input value at creation
*/
export class ID {
/**
* ID is the input type.
* It validates input value at creation
* @throws ValidationError if value is not in the accepted range
*/
constructor(public value: number) {
this.#validate(value);
}