First bitta TS done
This commit is contained in:
commit
a6d2ce5903
1
TSLearning/Section 1/.gitignore
vendored
Normal file
1
TSLearning/Section 1/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
node_modules/
|
8
TSLearning/Section 1/app.js
Normal file
8
TSLearning/Section 1/app.js
Normal file
@ -0,0 +1,8 @@
|
||||
function sendRequest(data, cb) {
|
||||
// ... sending a request with "data"
|
||||
return cb({ data: 'Hi there!' });
|
||||
}
|
||||
sendRequest('Send this!', function (response) {
|
||||
console.log(response);
|
||||
return true;
|
||||
});
|
9
TSLearning/Section 1/app.ts
Normal file
9
TSLearning/Section 1/app.ts
Normal file
@ -0,0 +1,9 @@
|
||||
function sendRequest(data: string, cb: (response: any) => void) {
|
||||
// ... sending a request with "data"
|
||||
return cb({data: 'Hi there!'});
|
||||
}
|
||||
|
||||
sendRequest('Send this!', (response) => {
|
||||
console.log(response);
|
||||
return true;
|
||||
});
|
8
TSLearning/Section 1/firstBit.ts
Normal file
8
TSLearning/Section 1/firstBit.ts
Normal file
@ -0,0 +1,8 @@
|
||||
function add(n1 :number, n2 :number){
|
||||
return n1 + n2;
|
||||
}
|
||||
const number1 = 5;
|
||||
const number2 = 3.3;
|
||||
|
||||
const result = add(number1, number2);
|
||||
console.log(result);
|
14
TSLearning/Section 1/index.html
Normal file
14
TSLearning/Section 1/index.html
Normal file
@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Typescript Learning</title>
|
||||
<script src="app.js" defer></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<p> Hi </p>
|
||||
</body>
|
||||
</html>
|
1630
TSLearning/Section 1/package-lock.json
generated
Normal file
1630
TSLearning/Section 1/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
15
TSLearning/Section 1/package.json
Normal file
15
TSLearning/Section 1/package.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "section-1",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "app.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"start": "lite-server"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"lite-server": "^2.5.4"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user