Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TypeScript #9

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Add TypeScript #9

wants to merge 3 commits into from

Conversation

Linkgoron
Copy link

TypeScript is an open-source programming language developed and maintained by Microsoft. It is a strict syntactical superset of JavaScript, and adds optional static typing to the language.

Typescript is very robust, and this will really improve the code quality in this repository.

Copy link

@MoLow MoLow left a comment

Choose a reason for hiding this comment

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

Super duper important

@@ -0,0 +1,12 @@
{
"requires": true,
"lockfileVersion": 1,

Choose a reason for hiding this comment

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

Suggested change
"lockfileVersion": 1,
"loackerfileVersion": 1,

package.json Show resolved Hide resolved
@@ -18,9 +18,9 @@ http.createServer(function (request, response) {
ans = 'num must be used with fibonacci pathname!';
}
else {
n = parseInt(queryData.num);
let n = parseInt(queryData.num);
Copy link
Owner

Choose a reason for hiding this comment

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

Please define a custom type for n

Copy link
Author

Choose a reason for hiding this comment

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

done

@@ -18,9 +18,9 @@ http.createServer(function (request, response) {
ans = 'num must be used with fibonacci pathname!';
}
else {
n = parseInt(queryData.num);
let n:number = parseInt(queryData.num);
Copy link
Owner

Choose a reason for hiding this comment

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

Please extract parseInt to a function to better encapsulate how to parse ints.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants