Skip to content

Commit

Permalink
local(typescript): Local configuration for typechecking
Browse files Browse the repository at this point in the history
  • Loading branch information
Desplandis committed Jun 21, 2023
1 parent 9727ceb commit a9e6f04
Show file tree
Hide file tree
Showing 4 changed files with 130 additions and 0 deletions.
95 changes: 95 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
"@babel/plugin-transform-runtime": "^7.18.0",
"@babel/preset-env": "^7.18.0",
"@babel/register": "^7.17.7",
"@types/three": "^0.152.1",
"babel-inline-import-loader": "^1.0.1",
"babel-loader": "^8.2.5",
"babel-plugin-inline-import": "^3.0.0",
Expand Down Expand Up @@ -111,6 +112,7 @@
"q": "^1.5.1",
"replace-in-file": "^6.3.2",
"three": "0.146.0",
"typescript": "^4.9.5",
"url-polyfill": "^1.1.12",
"webpack": "^5.72.1",
"webpack-cli": "^4.9.2",
Expand Down
5 changes: 5 additions & 0 deletions src/Renderer/c3DEngine.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ class c3DEngine {
}
}.bind(this);

/**
* @type {function}
* @param {number} w
* @param {number} h
*/
this.onWindowResize = function _(w, h) {
this.width = w;
this.height = h;
Expand Down
28 changes: 28 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"include": [ "src/Main.js" ],
"exclude": [ "node_modules", "lib", "dist" ],
"compilerOptions": {
/* Type Checking */
"strict": true,
/* Modules */
"baseUrl": ".",
"paths": {
"*": [ "node_modules/*", "src/*" ]
},
/* Emit */
"declaration": true,
"emitDeclarationOnly": true,
"outDir": "lib",
/* JavaScript Support */
"allowJs": true,
//"checkJs": true, // uncomment for type checking of js files
/* Interop Constraints */
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"isolatedModules": true,
/* Language and Environment */
"target": "esnext",
/* Completeness */
"skipLibCheck": true
}
}

0 comments on commit a9e6f04

Please sign in to comment.