diff --git a/modulo5/lista-typescript/.gitignore b/modulo5/lista-typescript/.gitignore new file mode 100644 index 0000000..b512c09 --- /dev/null +++ b/modulo5/lista-typescript/.gitignore @@ -0,0 +1 @@ +node_modules \ No newline at end of file diff --git a/modulo5/lista-typescript/package-lock.json b/modulo5/lista-typescript/package-lock.json new file mode 100644 index 0000000..77d8f86 --- /dev/null +++ b/modulo5/lista-typescript/package-lock.json @@ -0,0 +1,35 @@ +{ + "name": "lista-typescript", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "lista-typescript", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "typescript": "^4.7.2" + } + }, + "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/modulo5/lista-typescript/package.json b/modulo5/lista-typescript/package.json new file mode 100644 index 0000000..eef3ce7 --- /dev/null +++ b/modulo5/lista-typescript/package.json @@ -0,0 +1,16 @@ +{ + "name": "lista-typescript", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "start": "tsc && node ./build/index.js", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "", + "license": "ISC", + "dependencies": { + "typescript": "^4.7.2" + } +} diff --git a/modulo5/lista-typescript/src/index.ts b/modulo5/lista-typescript/src/index.ts new file mode 100644 index 0000000..bfb77b3 --- /dev/null +++ b/modulo5/lista-typescript/src/index.ts @@ -0,0 +1,13 @@ +/* Ex 01 + +function saudacao(nome:string, data:string){ + + let dataparastring:string[] = data.split("/") + + return (`Olá me chamo ${nome}, nasci no dia ${dataparastring[0]} do mês de ${dataparastring[1]} do ano de ${dataparastring[2]}`) + +} + +console.log(saudacao("Rodrigo","25/03/1996" )) */ + + diff --git a/modulo5/lista-typescript/tsconfig.json b/modulo5/lista-typescript/tsconfig.json new file mode 100644 index 0000000..553fee6 --- /dev/null +++ b/modulo5/lista-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