looks about right
This commit is contained in:
parent
3abf3f3bce
commit
3f33f23c96
4 changed files with 32 additions and 18 deletions
4
main.ts
4
main.ts
|
|
@ -7,13 +7,13 @@ const solvables: Solvable[] = [];
|
|||
// need to wrap this stuff in a function to not trip the top level await
|
||||
(async () => {
|
||||
// cool dynamic module loading
|
||||
for (const solution of solutionFiles){
|
||||
for (const solution of solutionFiles) {
|
||||
await import('./solutions/' + solution.name)
|
||||
}
|
||||
|
||||
if (import.meta.main) {
|
||||
// only solve the latest day
|
||||
solvables.toReversed()[0].part1().part2()
|
||||
solvables.toReversed()[0].part1().then(solvable => solvable.part2())
|
||||
}
|
||||
})()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue