Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"clean": "tsc --clean",
"build": "tsc --build",
"watch": "tsc --watch",
"mocha": "ts-mocha test/**/*.ts",
"mocha": "ts-mocha -p tsconfig.json --require ts-node/register --exit test/**/*.ts",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this you can litraly put code like this in your typescript tests and they just pass 😬

    let wrongType: boolean = "true"; // Hint - it is a string
    console.log(wrongType, typeof wrongType, "wrongType");

{{/if}}
{{#if is_rescript}}
"clean": "rescript clean",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@
"esModuleInterop": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"module": "CommonJS"
"module": "CommonJS",
"strictNullChecks": true,
"strictFunctionTypes": true,
"strictPropertyInitialization": true,
"noImplicitThis": true,
"alwaysStrict": true
Comment on lines +16 to +20
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought it is good to add these flags too.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏 - awesome. Thanks, will give that a read

},
"include": [
"src",
Expand Down