diff --git a/modulo3/projeto-labex/projeto-labex/src/App.js b/modulo3/projeto-labex/projeto-labex/src/App.js index 6d81f03..7a12e3a 100644 --- a/modulo3/projeto-labex/projeto-labex/src/App.js +++ b/modulo3/projeto-labex/projeto-labex/src/App.js @@ -1,13 +1,11 @@ import React from "react"; import { Router } from "./Routes/Router"; -// import ApplicationFormPage from "./Pages/ApplicationFormPage"; const App =()=> { return (
- {/* */}
); } diff --git a/modulo4/intro-typescript/template-typescript/.gitignore b/modulo4/intro-typescript/template-typescript/.gitignore new file mode 100644 index 0000000..b512c09 --- /dev/null +++ b/modulo4/intro-typescript/template-typescript/.gitignore @@ -0,0 +1 @@ +node_modules \ No newline at end of file diff --git a/modulo4/intro-typescript/template-typescript/package-lock.json b/modulo4/intro-typescript/template-typescript/package-lock.json new file mode 100644 index 0000000..403418a --- /dev/null +++ b/modulo4/intro-typescript/template-typescript/package-lock.json @@ -0,0 +1,35 @@ +{ + "name": "introducao-typescript", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "introducao-typescript", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "typescript": "^4.5.4" + } + }, + "node_modules/typescript": { + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.2.tgz", + "integrity": "sha512-Mamb1iX2FDUpcTRzltPxgWMKy3fhg0TN378ylbktPGPK/99KbDtMQ4W1hwgsbPAsG3a0xKa1vmw4VKZQbkvz5A==", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + } + }, + "dependencies": { + "typescript": { + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.2.tgz", + "integrity": "sha512-Mamb1iX2FDUpcTRzltPxgWMKy3fhg0TN378ylbktPGPK/99KbDtMQ4W1hwgsbPAsG3a0xKa1vmw4VKZQbkvz5A==" + } + } +} diff --git a/modulo4/intro-typescript/template-typescript/package.json b/modulo4/intro-typescript/template-typescript/package.json new file mode 100644 index 0000000..579dcc5 --- /dev/null +++ b/modulo4/intro-typescript/template-typescript/package.json @@ -0,0 +1,22 @@ +{ + "name": "introducao-typescript", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + + "start": "clear && tsc && node ./build/index.js", + "exercicio1":"clear && tsc && node ./build/exercicio1.js", + "exercicio2":"clear && tsc && node ./build/exercicio2.js", + "exercicio3":"clear && tsc && node ./build/exercicio3.js", + "exercicio4":"clear && tsc && node ./build/exercicio4.js", + "exercicio5":"clear && tsc && node ./build/exercicio5.js" + + }, + "keywords": [], + "author": "", + "license": "ISC", + "dependencies": { + "typescript": "^4.5.4" + } +} diff --git a/modulo4/intro-typescript/template-typescript/src/exercicio1.ts b/modulo4/intro-typescript/template-typescript/src/exercicio1.ts new file mode 100644 index 0000000..a0b1887 --- /dev/null +++ b/modulo4/intro-typescript/template-typescript/src/exercicio1.ts @@ -0,0 +1,9 @@ +function checaTriangulo(a:number, b:number, c:number) { + if (a !== b && b !== c) { + return "Escaleno"; + } else if (a === b && b === c) { + return "Equilátero"; + } else { + return "Isósceles"; + } + } \ No newline at end of file diff --git a/modulo4/intro-typescript/template-typescript/src/exercicio2.ts b/modulo4/intro-typescript/template-typescript/src/exercicio2.ts new file mode 100644 index 0000000..c8fa844 --- /dev/null +++ b/modulo4/intro-typescript/template-typescript/src/exercicio2.ts @@ -0,0 +1,5 @@ +function imprimeTresCoresFavoritas(cor1:string, cor2:string, cor3:string): Array { + return[cor1, cor2, cor3] + } + console.log(imprimeTresCoresFavoritas("Laranja","Amarelo", "Azul" )); + \ No newline at end of file diff --git a/modulo4/intro-typescript/template-typescript/src/exercicio3.ts b/modulo4/intro-typescript/template-typescript/src/exercicio3.ts new file mode 100644 index 0000000..fb2d0a3 --- /dev/null +++ b/modulo4/intro-typescript/template-typescript/src/exercicio3.ts @@ -0,0 +1,5 @@ +function checaAnoBissexto(ano:number) { + const cond1 = ano % 400 === 0 + const cond2 = (ano % 4 === 0) && (ano % 100 !== 0) + return cond1 || cond2 + } \ No newline at end of file diff --git a/modulo4/intro-typescript/template-typescript/src/exercicio4.ts b/modulo4/intro-typescript/template-typescript/src/exercicio4.ts new file mode 100644 index 0000000..c8b2e34 --- /dev/null +++ b/modulo4/intro-typescript/template-typescript/src/exercicio4.ts @@ -0,0 +1,16 @@ +function comparaDoisNumeros(num1:number, num2:number) { + let maiorNumero:number + let menorNumero:number + + if (num1 > num2) { + maiorNumero = num1; + menorNumero = num2; + } else { + maiorNumero = num2; + menorNumero = num1; + } + + const diferenca = maiorNumero - menorNumero; + + return diferenca + } \ No newline at end of file diff --git a/modulo4/intro-typescript/template-typescript/src/index.ts b/modulo4/intro-typescript/template-typescript/src/index.ts new file mode 100644 index 0000000..a98fc24 --- /dev/null +++ b/modulo4/intro-typescript/template-typescript/src/index.ts @@ -0,0 +1,2 @@ +//escreva o seu código aqui + diff --git a/modulo4/intro-typescript/template-typescript/tsconfig.json b/modulo4/intro-typescript/template-typescript/tsconfig.json new file mode 100644 index 0000000..2a37221 --- /dev/null +++ b/modulo4/intro-typescript/template-typescript/tsconfig.json @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "target": "es6", /* Specify ECMAScript target version */ + "module": "commonjs", /* Specify module code generation */ + "sourceMap": true, /* Generates corresponding '.map' file. */ + "outDir": "./build", /* Redirect output structure to the directory. */ + "rootDir": "./src", /* Specify the root directory of input files. */ + "removeComments": true, /* Do not emit comments to output. */ + "noImplicitAny": true /* Raise error on declarations with an implied 'any' type. */ + } +} \ No newline at end of file