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: [