From 7097ff52d2cd08e13d88df3f6b7b22c31f99c3f6 Mon Sep 17 00:00:00 2001 From: Bouillaguet Quentin Date: Fri, 9 Feb 2024 14:13:59 +0100 Subject: [PATCH] feat: add typescript template --- src/{index.js => index.ts} | 2 +- webpack.config.mjs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename src/{index.js => index.ts} (92%) diff --git a/src/index.js b/src/index.ts similarity index 92% rename from src/index.js rename to src/index.ts index 6ab38c2..67ef2ba 100644 --- a/src/index.js +++ b/src/index.ts @@ -2,7 +2,7 @@ import * as itowns from 'itowns'; // Get our `
` element. When creating a `View`, a canvas will // be appended to this element. -const viewerDiv = document.getElementById('viewerDiv'); +const viewerDiv = document.getElementById('viewerDiv') as HTMLDivElement; // Define an initial camera position const placement = { diff --git a/webpack.config.mjs b/webpack.config.mjs index c790ae9..e046702 100644 --- a/webpack.config.mjs +++ b/webpack.config.mjs @@ -17,7 +17,7 @@ const config = (env) => { return { mode: env.production ? 'production' : 'development', entry: { - main: './src/index.js', + main: './src/index.ts', }, module: { rules: [