Skip to content

Commit 2a07201

Browse files
committed
Use some functions
1 parent 71e5e46 commit 2a07201

4 files changed

Lines changed: 43 additions & 4 deletions

File tree

typescript/startOver/dist/index.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
"use strict";
2-
let age = 33;
3-
console.log("HELLO");
2+
Object.defineProperty(exports, "__esModule", { value: true });
3+
const someFunctions_1 = require("./someFunctions");
4+
let x = "Some String";
5+
console.log((0, someFunctions_1.myFun)("Hello"));
6+
(0, someFunctions_1.printArray)([1, 2, 3]);
7+
(0, someFunctions_1.printOrPrameters)("car");
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
"use strict";
2+
Object.defineProperty(exports, "__esModule", { value: true });
3+
exports.printOrPrameters = exports.printArray = exports.myFun = void 0;
4+
const myFun = (x) => {
5+
return x + "!";
6+
};
7+
exports.myFun = myFun;
8+
const printArray = (ar) => {
9+
ar.forEach((a) => {
10+
console.log(a);
11+
});
12+
};
13+
exports.printArray = printArray;
14+
const printOrPrameters = (p) => {
15+
console.log(p);
16+
};
17+
exports.printOrPrameters = printOrPrameters;

typescript/startOver/src/index.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
import { myFun, printArray, printOrPrameters } from "./someFunctions"
2+
3+
let x:string = "Some String"
4+
5+
console.log(myFun("Hello"))
6+
printArray([1,2,3])
7+
printOrPrameters("car")
18

2-
let age: number = 33
3-
console.log("HELLO")
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
export const myFun = (x: string) => {
2+
return x + "!"
3+
}
4+
5+
export const printArray = (ar: number[]) => {
6+
ar.forEach((a)=> {
7+
console.log(a)
8+
})
9+
}
10+
11+
export const printOrPrameters = (p: "car" | "bas") => {
12+
console.log(p)
13+
}

0 commit comments

Comments
 (0)