summaryrefslogtreecommitdiff
path: root/cli/tools/init/templates/main.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tools/init/templates/main.ts')
-rw-r--r--cli/tools/init/templates/main.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/cli/tools/init/templates/main.ts b/cli/tools/init/templates/main.ts
new file mode 100644
index 000000000..be043e97c
--- /dev/null
+++ b/cli/tools/init/templates/main.ts
@@ -0,0 +1,8 @@
+export function add(a: number, b: number): number {
+ return a + b;
+}
+
+// Learn more at https://deno.land/manual/examples/module_metadata#concepts
+if (import.meta.main) {
+ console.log("Add 2 + 3 =", add(2, 3));
+}