├── .gitignore ├── README.md ├── index.html ├── package-lock.json ├── package.json ├── src ├── app.ts ├── desafios │ ├── desafio1.js │ ├── desafio2.js │ ├── desafio3.js │ └── desafio4.js ├── exemplos │ ├── any-vs-unknown-e-never.ts │ ├── any.ts │ ├── basico.ts │ ├── combinando.ts │ ├── enum.ts │ ├── exemplo-validacao.js │ ├── functions.ts │ └── objetos.ts └── respostas │ ├── desafio1.ts │ ├── desafio2.ts │ └── desafio3.ts └── tsconfig.json /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | app.js 3 | **/*.js 4 | **/*.js.map -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Aula de Typescript da Take na plataforma DIO 2 | 3 | *Bem vindo!!* 4 | 5 | O objetivo desse repositório é mostrar exemplos e desafios de typescript que vão dar uma noção geral suficiente da ferramenta para que ela seja usada no dia a dia do desenvolvedor. 6 | 7 | Para quem é esse repositório: 8 | * Pessoas que tem vontade de aprender javascript aplicando boas práticas desde o início 9 | * Pessoas que já usam javascript e querem desaprender hábitos negativos da linguagem 10 | * Quem já teve dor de cabeça com javascript e tem um trauma a ser curado 11 | 12 | ## O que é o Typescript 13 | É um superset do typescript que trás tipagem estática para a linguagem, além de outras features, com o propósito de melhorar a qualidade do código escrito e a sua usabilidade. Como é um superset o código compilado e usado em produção ainda é javascript, porém é um JS mais resiliente e turbinado graças ao uso de TS durante o desenvolvimento. 14 | 15 | ## Do que você vai precisar 16 | Ferramentas necessárias: 17 | * Do Node instalado na sua máquina 18 | * Instalar o typescript usando o npm (npm install -g typescript) 19 | * É interessante que ele seja instalado de forma global, para que o usuário possa usar a biblioteca a qualquer momento e em qualquer projeto para fazer testes rápidos com o TS. 20 | * De uma IDE como o visual studio code 21 | 22 | Requisitos técnicos: 23 | * Lógica de programação 24 | * Mas é melhor ainda se tiver um conhecimento básico de javascript 25 | 26 | ## Sobre a estrutura de commits 27 | Os commits foram feitos de tal forma que o usuário pode ler commit a commit em ordem de publicação e acompanhar gradualmente a criação do repositório e a lógica aplicada. É recomendado que o primeiro estudo seja feito dessa forma. Pequenos erros nos comentários ou de gramática podem ser encontrados no caminho (consequências do programador que estuda de madrugada), mas eles já foram devidamente corrigidos na última versão da main. 28 | 29 | ## Estrutura do repositório 30 | * *src* 31 | * Contém arquivos com exemplos de uso de TS e JS comentados para facilitar o entendimento da ferramenta 32 | * *desafios* 33 | * Contém vários arquivos JS que podem ser refatorados para solidificar o conhecimento adquirido na aula 34 | * *index.html* 35 | * É onde está a chamada para o arquivo app.js e pode ser manipulado a vontade para testarem seus scripts 36 | * *tsconfig.json* 37 | * O coração do TS que configura suas funcionalidades. 38 | * *package.json* 39 | * Nesse arquivo foram colocados alguns scripts com o propósito de facilitar a vida de quem usar esse repositório 40 | * start 41 | * Inicia o *lite-server*, que vai escutar modificações no index.html e em seus arquivos importados. É útil caso queira fazer testes no browser. A porta disposta normalmente é a *localhost:3000* 42 | * watch 43 | * Roda o *tsc --watch* com o propósito de compilar constantemente qualquer coisa que for editada nos arquivos TS para sua contraparte em JS. Esse comando evita que *tsc* tenha que ser digitado constantemente para fazer a compilação. 44 | 45 | ## Sobre como testar 46 | * Teste mão livre 47 | * Faça suas alterações em src/app.ts 48 | * Rode *tsc* ou *npm watch* para compilar elas para o arquivo dist/app.js 49 | * Caso queira fazer um teste interagindo com o DOM, altere o index.html 50 | * Rode o npm start e acesse o localhost:3000 51 | * Testar algum dos arquivos da pasta de exemplos ou desafios 52 | * Copie e cole o conteúdo para o arquivo src/app.ts ou altere o caminho do atributo src da tag script no index.html 53 | * ex : *src=dist/app.js* -> *src=dist/exemplos/any.js* 54 | * Rode *tsc* ou *npm watch* para compilar elas para o arquivo dist/app.js 55 | * Caso queira fazer um teste interagindo com o DOM, altere o index.html 56 | * Rode o npm start e acesse o localhost:3000 57 | Caso queira fazer testes usando html é só alterar o index.html. 58 | 59 | ## Sobre o tsconfig.json 60 | * Algumas configurações e funcionalidades legais são: 61 | 1. Opções básicas: 62 | * target 63 | * Define para qual versão do ECMAScript o typescript vai ser convertido 64 | * lib 65 | * Define quais bibliotecas vão vir por default com o TS. Isso é bacana caso o TS esteja sendo usado no backend e a iteração com o DOM não é necessária. Como teste, tentem remover as bibliotecas do DOM e olhem seu código enchendo de erros porque não sabe o que é um document 66 | * sourceMap 67 | * Cria arquivos .map.js que geram uma cópia do seu arquivo TS no source do browser (aquele do inspect). Podem ser debugados via breakpoint direto no browser e são uma excelente ajuda, já que o código compilado de JS é menos legível que o TS. 68 | * outDir 69 | * Pasta para onde seus arquivos JS serão enviados 70 | * rootDir 71 | * Pasta de onde seus arquivos TS serão coletados. Pode ser necessário inserir a opção include fora do *compilerOptions* com a pasta *src* inclusa 72 | 2. Opções de checagem de tipo: 73 | * strict 74 | * Marca todas opções de checagem de tipo como verdadeiras. Ideal caso seja a intenção do usuário ter o código mais consistente possível 75 | * noImplicitAny 76 | * Levanta erro caso variáveis não estejam tipadas. Caso essa seja a intenção, um "any" tem que ser explicitamente tipado 77 | * strictNullChecks 78 | * Pode levantar erro caso uma variável em uso seja potencialmente nula. 79 | * Ex: um botão que foi buscado usando um getElementById que não necessariamente vai encontrar um elemento é usado para escutar um evento. 80 | 3. Outras opções 81 | * noUnusedLocals 82 | * Levanta erro sempre que uma variável local não está sendo utilizada, como um let dentro de uma função 83 | * nuUnusedParameters 84 | * Mesmo caso de noUnusedLocals, mas para parâmetros de função 85 | * noImplicitReturns 86 | * Levanta um erro caso uma função tenha caminhos que retornam valor e outros que não retornam 87 | 4. Existem outras regras e explicações mais elaboradas na documentação oficial (https://www.typescriptlang.org/tsconfig) 88 | 89 | ## Sobre colaboração 90 | Sinta-se livre para abrir pull requests com melhorias para ajudar quem quiser aprender mais sobre Typescript. Também podem tirar dúvidas comigo via comentário. 91 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Document 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "aula-dio", 3 | "version": "1.0.0", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "accepts": { 8 | "version": "1.3.7", 9 | "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", 10 | "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", 11 | "requires": { 12 | "mime-types": "~2.1.24", 13 | "negotiator": "0.6.2" 14 | } 15 | }, 16 | "after": { 17 | "version": "0.8.2", 18 | "resolved": "https://registry.npmjs.org/after/-/after-0.8.2.tgz", 19 | "integrity": "sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8=" 20 | }, 21 | "ansi-regex": { 22 | "version": "2.1.1", 23 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", 24 | "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" 25 | }, 26 | "ansi-styles": { 27 | "version": "2.2.1", 28 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", 29 | "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" 30 | }, 31 | "anymatch": { 32 | "version": "3.1.2", 33 | "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", 34 | "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", 35 | "requires": { 36 | "normalize-path": "^3.0.0", 37 | "picomatch": "^2.0.4" 38 | } 39 | }, 40 | "arraybuffer.slice": { 41 | "version": "0.0.7", 42 | "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz", 43 | "integrity": "sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog==" 44 | }, 45 | "async": { 46 | "version": "1.5.2", 47 | "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", 48 | "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" 49 | }, 50 | "async-each-series": { 51 | "version": "0.1.1", 52 | "resolved": "https://registry.npmjs.org/async-each-series/-/async-each-series-0.1.1.tgz", 53 | "integrity": "sha1-dhfBkXQB/Yykooqtzj266Yr+tDI=" 54 | }, 55 | "axios": { 56 | "version": "0.21.1", 57 | "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", 58 | "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==", 59 | "requires": { 60 | "follow-redirects": "^1.10.0" 61 | } 62 | }, 63 | "backo2": { 64 | "version": "1.0.2", 65 | "resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz", 66 | "integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc=" 67 | }, 68 | "balanced-match": { 69 | "version": "1.0.2", 70 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 71 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" 72 | }, 73 | "base64-arraybuffer": { 74 | "version": "0.1.4", 75 | "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.4.tgz", 76 | "integrity": "sha1-mBjHngWbE1X5fgQooBfIOOkLqBI=" 77 | }, 78 | "base64id": { 79 | "version": "2.0.0", 80 | "resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz", 81 | "integrity": "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==" 82 | }, 83 | "batch": { 84 | "version": "0.6.1", 85 | "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", 86 | "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=" 87 | }, 88 | "binary-extensions": { 89 | "version": "2.2.0", 90 | "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", 91 | "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==" 92 | }, 93 | "blob": { 94 | "version": "0.0.5", 95 | "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.5.tgz", 96 | "integrity": "sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig==" 97 | }, 98 | "brace-expansion": { 99 | "version": "1.1.11", 100 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 101 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 102 | "requires": { 103 | "balanced-match": "^1.0.0", 104 | "concat-map": "0.0.1" 105 | } 106 | }, 107 | "braces": { 108 | "version": "3.0.2", 109 | "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", 110 | "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", 111 | "requires": { 112 | "fill-range": "^7.0.1" 113 | } 114 | }, 115 | "browser-sync": { 116 | "version": "2.27.4", 117 | "resolved": "https://registry.npmjs.org/browser-sync/-/browser-sync-2.27.4.tgz", 118 | "integrity": "sha512-zgjrI6oUXxLa671SxVmWfIH+XiG6yZiGuvsQ1huuGEBlKkWuBVKgYjh+j9kagKm891FARgmK4Ct4PAhckLKaYg==", 119 | "requires": { 120 | "browser-sync-client": "^2.27.4", 121 | "browser-sync-ui": "^2.27.4", 122 | "bs-recipes": "1.3.4", 123 | "bs-snippet-injector": "^2.0.1", 124 | "chokidar": "^3.5.1", 125 | "connect": "3.6.6", 126 | "connect-history-api-fallback": "^1", 127 | "dev-ip": "^1.0.1", 128 | "easy-extender": "^2.3.4", 129 | "eazy-logger": "3.1.0", 130 | "etag": "^1.8.1", 131 | "fresh": "^0.5.2", 132 | "fs-extra": "3.0.1", 133 | "http-proxy": "^1.18.1", 134 | "immutable": "^3", 135 | "localtunnel": "^2.0.1", 136 | "micromatch": "^4.0.2", 137 | "opn": "5.3.0", 138 | "portscanner": "2.1.1", 139 | "qs": "6.2.3", 140 | "raw-body": "^2.3.2", 141 | "resp-modifier": "6.0.2", 142 | "rx": "4.1.0", 143 | "send": "0.16.2", 144 | "serve-index": "1.9.1", 145 | "serve-static": "1.13.2", 146 | "server-destroy": "1.0.1", 147 | "socket.io": "2.4.0", 148 | "ua-parser-js": "^0.7.28", 149 | "yargs": "^15.4.1" 150 | } 151 | }, 152 | "browser-sync-client": { 153 | "version": "2.27.4", 154 | "resolved": "https://registry.npmjs.org/browser-sync-client/-/browser-sync-client-2.27.4.tgz", 155 | "integrity": "sha512-l0krAGZnpLaD+tUYdM25WeS4FP73ZoPeaxlVzOvmtL9uKSlvpmywsnDwa3PJzc3ubmDPAcD74ifJjl6MmVksXw==", 156 | "requires": { 157 | "etag": "1.8.1", 158 | "fresh": "0.5.2", 159 | "mitt": "^1.1.3", 160 | "rxjs": "^5.5.6" 161 | } 162 | }, 163 | "browser-sync-ui": { 164 | "version": "2.27.4", 165 | "resolved": "https://registry.npmjs.org/browser-sync-ui/-/browser-sync-ui-2.27.4.tgz", 166 | "integrity": "sha512-E58Mb6ycz57Nm393oqVJj4jxuLJH3MhZnY8AV+zd9LsNVGZjrKRNNIw5JPYYguyb37ZjLjq2x4u+38mRv3Sb7g==", 167 | "requires": { 168 | "async-each-series": "0.1.1", 169 | "connect-history-api-fallback": "^1", 170 | "immutable": "^3", 171 | "server-destroy": "1.0.1", 172 | "socket.io-client": "^2.4.0", 173 | "stream-throttle": "^0.1.3" 174 | } 175 | }, 176 | "bs-recipes": { 177 | "version": "1.3.4", 178 | "resolved": "https://registry.npmjs.org/bs-recipes/-/bs-recipes-1.3.4.tgz", 179 | "integrity": "sha1-DS1NSKcYyMBEdp/cT4lZLci2lYU=" 180 | }, 181 | "bs-snippet-injector": { 182 | "version": "2.0.1", 183 | "resolved": "https://registry.npmjs.org/bs-snippet-injector/-/bs-snippet-injector-2.0.1.tgz", 184 | "integrity": "sha1-YbU5PxH1JVntEgaTEANDtu2wTdU=" 185 | }, 186 | "bytes": { 187 | "version": "3.1.0", 188 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", 189 | "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" 190 | }, 191 | "camelcase": { 192 | "version": "5.3.1", 193 | "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", 194 | "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" 195 | }, 196 | "chalk": { 197 | "version": "1.1.3", 198 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", 199 | "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", 200 | "requires": { 201 | "ansi-styles": "^2.2.1", 202 | "escape-string-regexp": "^1.0.2", 203 | "has-ansi": "^2.0.0", 204 | "strip-ansi": "^3.0.0", 205 | "supports-color": "^2.0.0" 206 | } 207 | }, 208 | "chokidar": { 209 | "version": "3.5.2", 210 | "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", 211 | "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==", 212 | "requires": { 213 | "anymatch": "~3.1.2", 214 | "braces": "~3.0.2", 215 | "fsevents": "~2.3.2", 216 | "glob-parent": "~5.1.2", 217 | "is-binary-path": "~2.1.0", 218 | "is-glob": "~4.0.1", 219 | "normalize-path": "~3.0.0", 220 | "readdirp": "~3.6.0" 221 | } 222 | }, 223 | "cliui": { 224 | "version": "7.0.4", 225 | "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", 226 | "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", 227 | "requires": { 228 | "string-width": "^4.2.0", 229 | "strip-ansi": "^6.0.0", 230 | "wrap-ansi": "^7.0.0" 231 | }, 232 | "dependencies": { 233 | "ansi-regex": { 234 | "version": "5.0.0", 235 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", 236 | "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" 237 | }, 238 | "strip-ansi": { 239 | "version": "6.0.0", 240 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", 241 | "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", 242 | "requires": { 243 | "ansi-regex": "^5.0.0" 244 | } 245 | } 246 | } 247 | }, 248 | "color-convert": { 249 | "version": "2.0.1", 250 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 251 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 252 | "requires": { 253 | "color-name": "~1.1.4" 254 | } 255 | }, 256 | "color-name": { 257 | "version": "1.1.4", 258 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 259 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" 260 | }, 261 | "commander": { 262 | "version": "2.20.3", 263 | "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", 264 | "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" 265 | }, 266 | "component-bind": { 267 | "version": "1.0.0", 268 | "resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz", 269 | "integrity": "sha1-AMYIq33Nk4l8AAllGx06jh5zu9E=" 270 | }, 271 | "component-emitter": { 272 | "version": "1.3.0", 273 | "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", 274 | "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==" 275 | }, 276 | "component-inherit": { 277 | "version": "0.0.3", 278 | "resolved": "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz", 279 | "integrity": "sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM=" 280 | }, 281 | "concat-map": { 282 | "version": "0.0.1", 283 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 284 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" 285 | }, 286 | "connect": { 287 | "version": "3.6.6", 288 | "resolved": "https://registry.npmjs.org/connect/-/connect-3.6.6.tgz", 289 | "integrity": "sha1-Ce/2xVr3I24TcTWnJXSFi2eG9SQ=", 290 | "requires": { 291 | "debug": "2.6.9", 292 | "finalhandler": "1.1.0", 293 | "parseurl": "~1.3.2", 294 | "utils-merge": "1.0.1" 295 | }, 296 | "dependencies": { 297 | "debug": { 298 | "version": "2.6.9", 299 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 300 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 301 | "requires": { 302 | "ms": "2.0.0" 303 | } 304 | } 305 | } 306 | }, 307 | "connect-history-api-fallback": { 308 | "version": "1.6.0", 309 | "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz", 310 | "integrity": "sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg==" 311 | }, 312 | "connect-logger": { 313 | "version": "0.0.1", 314 | "resolved": "https://registry.npmjs.org/connect-logger/-/connect-logger-0.0.1.tgz", 315 | "integrity": "sha1-TZmZeKHSC7RgjnzUNNdBZSJVF0s=", 316 | "requires": { 317 | "moment": "*" 318 | } 319 | }, 320 | "cookie": { 321 | "version": "0.4.1", 322 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz", 323 | "integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==" 324 | }, 325 | "debug": { 326 | "version": "3.1.0", 327 | "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", 328 | "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", 329 | "requires": { 330 | "ms": "2.0.0" 331 | } 332 | }, 333 | "decamelize": { 334 | "version": "1.2.0", 335 | "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", 336 | "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" 337 | }, 338 | "depd": { 339 | "version": "1.1.2", 340 | "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", 341 | "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" 342 | }, 343 | "destroy": { 344 | "version": "1.0.4", 345 | "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", 346 | "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" 347 | }, 348 | "dev-ip": { 349 | "version": "1.0.1", 350 | "resolved": "https://registry.npmjs.org/dev-ip/-/dev-ip-1.0.1.tgz", 351 | "integrity": "sha1-p2o+0YVb56ASu4rBbLgPPADcKPA=" 352 | }, 353 | "dlv": { 354 | "version": "1.1.3", 355 | "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", 356 | "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==" 357 | }, 358 | "easy-extender": { 359 | "version": "2.3.4", 360 | "resolved": "https://registry.npmjs.org/easy-extender/-/easy-extender-2.3.4.tgz", 361 | "integrity": "sha512-8cAwm6md1YTiPpOvDULYJL4ZS6WfM5/cTeVVh4JsvyYZAoqlRVUpHL9Gr5Fy7HA6xcSZicUia3DeAgO3Us8E+Q==", 362 | "requires": { 363 | "lodash": "^4.17.10" 364 | } 365 | }, 366 | "eazy-logger": { 367 | "version": "3.1.0", 368 | "resolved": "https://registry.npmjs.org/eazy-logger/-/eazy-logger-3.1.0.tgz", 369 | "integrity": "sha512-/snsn2JqBtUSSstEl4R0RKjkisGHAhvYj89i7r3ytNUKW12y178KDZwXLXIgwDqLW6E/VRMT9qfld7wvFae8bQ==", 370 | "requires": { 371 | "tfunk": "^4.0.0" 372 | } 373 | }, 374 | "ee-first": { 375 | "version": "1.1.1", 376 | "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", 377 | "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" 378 | }, 379 | "emoji-regex": { 380 | "version": "8.0.0", 381 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", 382 | "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" 383 | }, 384 | "encodeurl": { 385 | "version": "1.0.2", 386 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", 387 | "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" 388 | }, 389 | "engine.io": { 390 | "version": "3.5.0", 391 | "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.5.0.tgz", 392 | "integrity": "sha512-21HlvPUKaitDGE4GXNtQ7PLP0Sz4aWLddMPw2VTyFz1FVZqu/kZsJUO8WNpKuE/OCL7nkfRaOui2ZCJloGznGA==", 393 | "requires": { 394 | "accepts": "~1.3.4", 395 | "base64id": "2.0.0", 396 | "cookie": "~0.4.1", 397 | "debug": "~4.1.0", 398 | "engine.io-parser": "~2.2.0", 399 | "ws": "~7.4.2" 400 | }, 401 | "dependencies": { 402 | "debug": { 403 | "version": "4.1.1", 404 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", 405 | "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", 406 | "requires": { 407 | "ms": "^2.1.1" 408 | } 409 | }, 410 | "ms": { 411 | "version": "2.1.3", 412 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 413 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" 414 | } 415 | } 416 | }, 417 | "engine.io-client": { 418 | "version": "3.5.2", 419 | "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.5.2.tgz", 420 | "integrity": "sha512-QEqIp+gJ/kMHeUun7f5Vv3bteRHppHH/FMBQX/esFj/fuYfjyUKWGMo3VCvIP/V8bE9KcjHmRZrhIz2Z9oNsDA==", 421 | "requires": { 422 | "component-emitter": "~1.3.0", 423 | "component-inherit": "0.0.3", 424 | "debug": "~3.1.0", 425 | "engine.io-parser": "~2.2.0", 426 | "has-cors": "1.1.0", 427 | "indexof": "0.0.1", 428 | "parseqs": "0.0.6", 429 | "parseuri": "0.0.6", 430 | "ws": "~7.4.2", 431 | "xmlhttprequest-ssl": "~1.6.2", 432 | "yeast": "0.1.2" 433 | } 434 | }, 435 | "engine.io-parser": { 436 | "version": "2.2.1", 437 | "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.2.1.tgz", 438 | "integrity": "sha512-x+dN/fBH8Ro8TFwJ+rkB2AmuVw9Yu2mockR/p3W8f8YtExwFgDvBDi0GWyb4ZLkpahtDGZgtr3zLovanJghPqg==", 439 | "requires": { 440 | "after": "0.8.2", 441 | "arraybuffer.slice": "~0.0.7", 442 | "base64-arraybuffer": "0.1.4", 443 | "blob": "0.0.5", 444 | "has-binary2": "~1.0.2" 445 | } 446 | }, 447 | "escalade": { 448 | "version": "3.1.1", 449 | "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", 450 | "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" 451 | }, 452 | "escape-html": { 453 | "version": "1.0.3", 454 | "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", 455 | "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" 456 | }, 457 | "escape-string-regexp": { 458 | "version": "1.0.5", 459 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", 460 | "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" 461 | }, 462 | "etag": { 463 | "version": "1.8.1", 464 | "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", 465 | "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" 466 | }, 467 | "eventemitter3": { 468 | "version": "4.0.7", 469 | "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", 470 | "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==" 471 | }, 472 | "fill-range": { 473 | "version": "7.0.1", 474 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", 475 | "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", 476 | "requires": { 477 | "to-regex-range": "^5.0.1" 478 | } 479 | }, 480 | "finalhandler": { 481 | "version": "1.1.0", 482 | "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.0.tgz", 483 | "integrity": "sha1-zgtoVbRYU+eRsvzGgARtiCU91/U=", 484 | "requires": { 485 | "debug": "2.6.9", 486 | "encodeurl": "~1.0.1", 487 | "escape-html": "~1.0.3", 488 | "on-finished": "~2.3.0", 489 | "parseurl": "~1.3.2", 490 | "statuses": "~1.3.1", 491 | "unpipe": "~1.0.0" 492 | }, 493 | "dependencies": { 494 | "debug": { 495 | "version": "2.6.9", 496 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 497 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 498 | "requires": { 499 | "ms": "2.0.0" 500 | } 501 | } 502 | } 503 | }, 504 | "find-up": { 505 | "version": "4.1.0", 506 | "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", 507 | "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", 508 | "requires": { 509 | "locate-path": "^5.0.0", 510 | "path-exists": "^4.0.0" 511 | } 512 | }, 513 | "follow-redirects": { 514 | "version": "1.14.1", 515 | "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.1.tgz", 516 | "integrity": "sha512-HWqDgT7ZEkqRzBvc2s64vSZ/hfOceEol3ac/7tKwzuvEyWx3/4UegXh5oBOIotkGsObyk3xznnSRVADBgWSQVg==" 517 | }, 518 | "fresh": { 519 | "version": "0.5.2", 520 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", 521 | "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" 522 | }, 523 | "fs-extra": { 524 | "version": "3.0.1", 525 | "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-3.0.1.tgz", 526 | "integrity": "sha1-N5TzeMWLNC6n27sjCVEJxLO2IpE=", 527 | "requires": { 528 | "graceful-fs": "^4.1.2", 529 | "jsonfile": "^3.0.0", 530 | "universalify": "^0.1.0" 531 | } 532 | }, 533 | "fsevents": { 534 | "version": "2.3.2", 535 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", 536 | "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", 537 | "optional": true 538 | }, 539 | "get-caller-file": { 540 | "version": "2.0.5", 541 | "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", 542 | "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" 543 | }, 544 | "glob-parent": { 545 | "version": "5.1.2", 546 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", 547 | "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", 548 | "requires": { 549 | "is-glob": "^4.0.1" 550 | } 551 | }, 552 | "graceful-fs": { 553 | "version": "4.2.6", 554 | "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", 555 | "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==" 556 | }, 557 | "has-ansi": { 558 | "version": "2.0.0", 559 | "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", 560 | "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", 561 | "requires": { 562 | "ansi-regex": "^2.0.0" 563 | } 564 | }, 565 | "has-binary2": { 566 | "version": "1.0.3", 567 | "resolved": "https://registry.npmjs.org/has-binary2/-/has-binary2-1.0.3.tgz", 568 | "integrity": "sha512-G1LWKhDSvhGeAQ8mPVQlqNcOB2sJdwATtZKl2pDKKHfpf/rYj24lkinxf69blJbnsvtqqNU+L3SL50vzZhXOnw==", 569 | "requires": { 570 | "isarray": "2.0.1" 571 | } 572 | }, 573 | "has-cors": { 574 | "version": "1.1.0", 575 | "resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz", 576 | "integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk=" 577 | }, 578 | "http-errors": { 579 | "version": "1.7.3", 580 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.3.tgz", 581 | "integrity": "sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw==", 582 | "requires": { 583 | "depd": "~1.1.2", 584 | "inherits": "2.0.4", 585 | "setprototypeof": "1.1.1", 586 | "statuses": ">= 1.5.0 < 2", 587 | "toidentifier": "1.0.0" 588 | }, 589 | "dependencies": { 590 | "statuses": { 591 | "version": "1.5.0", 592 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", 593 | "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" 594 | } 595 | } 596 | }, 597 | "http-proxy": { 598 | "version": "1.18.1", 599 | "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz", 600 | "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", 601 | "requires": { 602 | "eventemitter3": "^4.0.0", 603 | "follow-redirects": "^1.0.0", 604 | "requires-port": "^1.0.0" 605 | } 606 | }, 607 | "iconv-lite": { 608 | "version": "0.4.24", 609 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", 610 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", 611 | "requires": { 612 | "safer-buffer": ">= 2.1.2 < 3" 613 | } 614 | }, 615 | "immutable": { 616 | "version": "3.8.2", 617 | "resolved": "https://registry.npmjs.org/immutable/-/immutable-3.8.2.tgz", 618 | "integrity": "sha1-wkOZUUVbs5kT2vKBN28VMOEErfM=" 619 | }, 620 | "indexof": { 621 | "version": "0.0.1", 622 | "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", 623 | "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=" 624 | }, 625 | "inherits": { 626 | "version": "2.0.4", 627 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 628 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" 629 | }, 630 | "is-binary-path": { 631 | "version": "2.1.0", 632 | "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", 633 | "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", 634 | "requires": { 635 | "binary-extensions": "^2.0.0" 636 | } 637 | }, 638 | "is-extglob": { 639 | "version": "2.1.1", 640 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 641 | "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" 642 | }, 643 | "is-fullwidth-code-point": { 644 | "version": "3.0.0", 645 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 646 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" 647 | }, 648 | "is-glob": { 649 | "version": "4.0.1", 650 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", 651 | "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", 652 | "requires": { 653 | "is-extglob": "^2.1.1" 654 | } 655 | }, 656 | "is-number": { 657 | "version": "7.0.0", 658 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", 659 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" 660 | }, 661 | "is-number-like": { 662 | "version": "1.0.8", 663 | "resolved": "https://registry.npmjs.org/is-number-like/-/is-number-like-1.0.8.tgz", 664 | "integrity": "sha512-6rZi3ezCyFcn5L71ywzz2bS5b2Igl1En3eTlZlvKjpz1n3IZLAYMbKYAIQgFmEu0GENg92ziU/faEOA/aixjbA==", 665 | "requires": { 666 | "lodash.isfinite": "^3.3.2" 667 | } 668 | }, 669 | "is-wsl": { 670 | "version": "1.1.0", 671 | "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", 672 | "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=" 673 | }, 674 | "isarray": { 675 | "version": "2.0.1", 676 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", 677 | "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=" 678 | }, 679 | "jsonfile": { 680 | "version": "3.0.1", 681 | "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-3.0.1.tgz", 682 | "integrity": "sha1-pezG9l9T9mLEQVx2daAzHQmS7GY=", 683 | "requires": { 684 | "graceful-fs": "^4.1.6" 685 | } 686 | }, 687 | "limiter": { 688 | "version": "1.1.5", 689 | "resolved": "https://registry.npmjs.org/limiter/-/limiter-1.1.5.tgz", 690 | "integrity": "sha512-FWWMIEOxz3GwUI4Ts/IvgVy6LPvoMPgjMdQ185nN6psJyBJ4yOpzqm695/h5umdLJg2vW3GR5iG11MAkR2AzJA==" 691 | }, 692 | "lite-server": { 693 | "version": "2.6.1", 694 | "resolved": "https://registry.npmjs.org/lite-server/-/lite-server-2.6.1.tgz", 695 | "integrity": "sha512-d3oyB/C8AU4EwYQHlLxcu6vTQDnCaLb81v1KKNYABmFS5oeJ11A+YxlqtpbTclID1AFddJfcB5klf0q98vYIMw==", 696 | "requires": { 697 | "browser-sync": "^2.26.13", 698 | "connect-history-api-fallback": "^1.6.0", 699 | "connect-logger": "^0.0.1", 700 | "lodash": "^4.17.20", 701 | "minimist": "^1.2.5" 702 | } 703 | }, 704 | "localtunnel": { 705 | "version": "2.0.1", 706 | "resolved": "https://registry.npmjs.org/localtunnel/-/localtunnel-2.0.1.tgz", 707 | "integrity": "sha512-LiaI5wZdz0xFkIQpXbNI62ZnNn8IMsVhwxHmhA+h4vj8R9JG/07bQHWwQlyy7b95/5fVOCHJfIHv+a5XnkvaJA==", 708 | "requires": { 709 | "axios": "0.21.1", 710 | "debug": "4.3.1", 711 | "openurl": "1.1.1", 712 | "yargs": "16.2.0" 713 | }, 714 | "dependencies": { 715 | "debug": { 716 | "version": "4.3.1", 717 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", 718 | "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", 719 | "requires": { 720 | "ms": "2.1.2" 721 | } 722 | }, 723 | "ms": { 724 | "version": "2.1.2", 725 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 726 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" 727 | }, 728 | "yargs": { 729 | "version": "16.2.0", 730 | "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", 731 | "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", 732 | "requires": { 733 | "cliui": "^7.0.2", 734 | "escalade": "^3.1.1", 735 | "get-caller-file": "^2.0.5", 736 | "require-directory": "^2.1.1", 737 | "string-width": "^4.2.0", 738 | "y18n": "^5.0.5", 739 | "yargs-parser": "^20.2.2" 740 | } 741 | } 742 | } 743 | }, 744 | "locate-path": { 745 | "version": "5.0.0", 746 | "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", 747 | "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", 748 | "requires": { 749 | "p-locate": "^4.1.0" 750 | } 751 | }, 752 | "lodash": { 753 | "version": "4.17.21", 754 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", 755 | "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" 756 | }, 757 | "lodash.isfinite": { 758 | "version": "3.3.2", 759 | "resolved": "https://registry.npmjs.org/lodash.isfinite/-/lodash.isfinite-3.3.2.tgz", 760 | "integrity": "sha1-+4m2WpqAKBgz8LdHizpRBPiY67M=" 761 | }, 762 | "micromatch": { 763 | "version": "4.0.4", 764 | "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", 765 | "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", 766 | "requires": { 767 | "braces": "^3.0.1", 768 | "picomatch": "^2.2.3" 769 | } 770 | }, 771 | "mime": { 772 | "version": "1.4.1", 773 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", 774 | "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==" 775 | }, 776 | "mime-db": { 777 | "version": "1.48.0", 778 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.48.0.tgz", 779 | "integrity": "sha512-FM3QwxV+TnZYQ2aRqhlKBMHxk10lTbMt3bBkMAp54ddrNeVSfcQYOOKuGuy3Ddrm38I04If834fOUSq1yzslJQ==" 780 | }, 781 | "mime-types": { 782 | "version": "2.1.31", 783 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.31.tgz", 784 | "integrity": "sha512-XGZnNzm3QvgKxa8dpzyhFTHmpP3l5YNusmne07VUOXxou9CqUqYa/HBy124RqtVh/O2pECas/MOcsDgpilPOPg==", 785 | "requires": { 786 | "mime-db": "1.48.0" 787 | } 788 | }, 789 | "minimatch": { 790 | "version": "3.0.4", 791 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", 792 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", 793 | "requires": { 794 | "brace-expansion": "^1.1.7" 795 | } 796 | }, 797 | "minimist": { 798 | "version": "1.2.5", 799 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", 800 | "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" 801 | }, 802 | "mitt": { 803 | "version": "1.2.0", 804 | "resolved": "https://registry.npmjs.org/mitt/-/mitt-1.2.0.tgz", 805 | "integrity": "sha512-r6lj77KlwqLhIUku9UWYes7KJtsczvolZkzp8hbaDPPaE24OmWl5s539Mytlj22siEQKosZ26qCBgda2PKwoJw==" 806 | }, 807 | "moment": { 808 | "version": "2.29.1", 809 | "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz", 810 | "integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==" 811 | }, 812 | "ms": { 813 | "version": "2.0.0", 814 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 815 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" 816 | }, 817 | "negotiator": { 818 | "version": "0.6.2", 819 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", 820 | "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" 821 | }, 822 | "normalize-path": { 823 | "version": "3.0.0", 824 | "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", 825 | "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" 826 | }, 827 | "on-finished": { 828 | "version": "2.3.0", 829 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", 830 | "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", 831 | "requires": { 832 | "ee-first": "1.1.1" 833 | } 834 | }, 835 | "openurl": { 836 | "version": "1.1.1", 837 | "resolved": "https://registry.npmjs.org/openurl/-/openurl-1.1.1.tgz", 838 | "integrity": "sha1-OHW0sO96UsFW8NtB1GCduw+Us4c=" 839 | }, 840 | "opn": { 841 | "version": "5.3.0", 842 | "resolved": "https://registry.npmjs.org/opn/-/opn-5.3.0.tgz", 843 | "integrity": "sha512-bYJHo/LOmoTd+pfiYhfZDnf9zekVJrY+cnS2a5F2x+w5ppvTqObojTP7WiFG+kVZs9Inw+qQ/lw7TroWwhdd2g==", 844 | "requires": { 845 | "is-wsl": "^1.1.0" 846 | } 847 | }, 848 | "p-limit": { 849 | "version": "2.3.0", 850 | "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", 851 | "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", 852 | "requires": { 853 | "p-try": "^2.0.0" 854 | } 855 | }, 856 | "p-locate": { 857 | "version": "4.1.0", 858 | "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", 859 | "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", 860 | "requires": { 861 | "p-limit": "^2.2.0" 862 | } 863 | }, 864 | "p-try": { 865 | "version": "2.2.0", 866 | "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", 867 | "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" 868 | }, 869 | "parseqs": { 870 | "version": "0.0.6", 871 | "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.6.tgz", 872 | "integrity": "sha512-jeAGzMDbfSHHA091hr0r31eYfTig+29g3GKKE/PPbEQ65X0lmMwlEoqmhzu0iztID5uJpZsFlUPDP8ThPL7M8w==" 873 | }, 874 | "parseuri": { 875 | "version": "0.0.6", 876 | "resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.6.tgz", 877 | "integrity": "sha512-AUjen8sAkGgao7UyCX6Ahv0gIK2fABKmYjvP4xmy5JaKvcbTRueIqIPHLAfq30xJddqSE033IOMUSOMCcK3Sow==" 878 | }, 879 | "parseurl": { 880 | "version": "1.3.3", 881 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", 882 | "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" 883 | }, 884 | "path-exists": { 885 | "version": "4.0.0", 886 | "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", 887 | "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" 888 | }, 889 | "picomatch": { 890 | "version": "2.3.0", 891 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", 892 | "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==" 893 | }, 894 | "portscanner": { 895 | "version": "2.1.1", 896 | "resolved": "https://registry.npmjs.org/portscanner/-/portscanner-2.1.1.tgz", 897 | "integrity": "sha1-6rtAnk3iSVD1oqUW01rnaTQ/u5Y=", 898 | "requires": { 899 | "async": "1.5.2", 900 | "is-number-like": "^1.0.3" 901 | } 902 | }, 903 | "qs": { 904 | "version": "6.2.3", 905 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.2.3.tgz", 906 | "integrity": "sha1-HPyyXBCpsrSDBT/zn138kjOQjP4=" 907 | }, 908 | "range-parser": { 909 | "version": "1.2.1", 910 | "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", 911 | "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" 912 | }, 913 | "raw-body": { 914 | "version": "2.4.1", 915 | "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.1.tgz", 916 | "integrity": "sha512-9WmIKF6mkvA0SLmA2Knm9+qj89e+j1zqgyn8aXGd7+nAduPoqgI9lO57SAZNn/Byzo5P7JhXTyg9PzaJbH73bA==", 917 | "requires": { 918 | "bytes": "3.1.0", 919 | "http-errors": "1.7.3", 920 | "iconv-lite": "0.4.24", 921 | "unpipe": "1.0.0" 922 | } 923 | }, 924 | "readdirp": { 925 | "version": "3.6.0", 926 | "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", 927 | "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", 928 | "requires": { 929 | "picomatch": "^2.2.1" 930 | } 931 | }, 932 | "require-directory": { 933 | "version": "2.1.1", 934 | "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", 935 | "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" 936 | }, 937 | "require-main-filename": { 938 | "version": "2.0.0", 939 | "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", 940 | "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" 941 | }, 942 | "requires-port": { 943 | "version": "1.0.0", 944 | "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", 945 | "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=" 946 | }, 947 | "resp-modifier": { 948 | "version": "6.0.2", 949 | "resolved": "https://registry.npmjs.org/resp-modifier/-/resp-modifier-6.0.2.tgz", 950 | "integrity": "sha1-sSTeXE+6/LpUH0j/pzlw9KpFa08=", 951 | "requires": { 952 | "debug": "^2.2.0", 953 | "minimatch": "^3.0.2" 954 | }, 955 | "dependencies": { 956 | "debug": { 957 | "version": "2.6.9", 958 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 959 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 960 | "requires": { 961 | "ms": "2.0.0" 962 | } 963 | } 964 | } 965 | }, 966 | "rx": { 967 | "version": "4.1.0", 968 | "resolved": "https://registry.npmjs.org/rx/-/rx-4.1.0.tgz", 969 | "integrity": "sha1-pfE/957zt0D+MKqAP7CfmIBdR4I=" 970 | }, 971 | "rxjs": { 972 | "version": "5.5.12", 973 | "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.12.tgz", 974 | "integrity": "sha512-xx2itnL5sBbqeeiVgNPVuQQ1nC8Jp2WfNJhXWHmElW9YmrpS9UVnNzhP3EH3HFqexO5Tlp8GhYY+WEcqcVMvGw==", 975 | "requires": { 976 | "symbol-observable": "1.0.1" 977 | } 978 | }, 979 | "safer-buffer": { 980 | "version": "2.1.2", 981 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 982 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" 983 | }, 984 | "send": { 985 | "version": "0.16.2", 986 | "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", 987 | "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", 988 | "requires": { 989 | "debug": "2.6.9", 990 | "depd": "~1.1.2", 991 | "destroy": "~1.0.4", 992 | "encodeurl": "~1.0.2", 993 | "escape-html": "~1.0.3", 994 | "etag": "~1.8.1", 995 | "fresh": "0.5.2", 996 | "http-errors": "~1.6.2", 997 | "mime": "1.4.1", 998 | "ms": "2.0.0", 999 | "on-finished": "~2.3.0", 1000 | "range-parser": "~1.2.0", 1001 | "statuses": "~1.4.0" 1002 | }, 1003 | "dependencies": { 1004 | "debug": { 1005 | "version": "2.6.9", 1006 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 1007 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 1008 | "requires": { 1009 | "ms": "2.0.0" 1010 | } 1011 | }, 1012 | "http-errors": { 1013 | "version": "1.6.3", 1014 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", 1015 | "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", 1016 | "requires": { 1017 | "depd": "~1.1.2", 1018 | "inherits": "2.0.3", 1019 | "setprototypeof": "1.1.0", 1020 | "statuses": ">= 1.4.0 < 2" 1021 | } 1022 | }, 1023 | "inherits": { 1024 | "version": "2.0.3", 1025 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", 1026 | "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" 1027 | }, 1028 | "setprototypeof": { 1029 | "version": "1.1.0", 1030 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", 1031 | "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" 1032 | }, 1033 | "statuses": { 1034 | "version": "1.4.0", 1035 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", 1036 | "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" 1037 | } 1038 | } 1039 | }, 1040 | "serve-index": { 1041 | "version": "1.9.1", 1042 | "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", 1043 | "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", 1044 | "requires": { 1045 | "accepts": "~1.3.4", 1046 | "batch": "0.6.1", 1047 | "debug": "2.6.9", 1048 | "escape-html": "~1.0.3", 1049 | "http-errors": "~1.6.2", 1050 | "mime-types": "~2.1.17", 1051 | "parseurl": "~1.3.2" 1052 | }, 1053 | "dependencies": { 1054 | "debug": { 1055 | "version": "2.6.9", 1056 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 1057 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 1058 | "requires": { 1059 | "ms": "2.0.0" 1060 | } 1061 | }, 1062 | "http-errors": { 1063 | "version": "1.6.3", 1064 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", 1065 | "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", 1066 | "requires": { 1067 | "depd": "~1.1.2", 1068 | "inherits": "2.0.3", 1069 | "setprototypeof": "1.1.0", 1070 | "statuses": ">= 1.4.0 < 2" 1071 | } 1072 | }, 1073 | "inherits": { 1074 | "version": "2.0.3", 1075 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", 1076 | "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" 1077 | }, 1078 | "setprototypeof": { 1079 | "version": "1.1.0", 1080 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", 1081 | "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" 1082 | }, 1083 | "statuses": { 1084 | "version": "1.5.0", 1085 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", 1086 | "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" 1087 | } 1088 | } 1089 | }, 1090 | "serve-static": { 1091 | "version": "1.13.2", 1092 | "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", 1093 | "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", 1094 | "requires": { 1095 | "encodeurl": "~1.0.2", 1096 | "escape-html": "~1.0.3", 1097 | "parseurl": "~1.3.2", 1098 | "send": "0.16.2" 1099 | } 1100 | }, 1101 | "server-destroy": { 1102 | "version": "1.0.1", 1103 | "resolved": "https://registry.npmjs.org/server-destroy/-/server-destroy-1.0.1.tgz", 1104 | "integrity": "sha1-8Tv5KOQrnD55OD5hzDmYtdFObN0=" 1105 | }, 1106 | "set-blocking": { 1107 | "version": "2.0.0", 1108 | "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", 1109 | "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" 1110 | }, 1111 | "setprototypeof": { 1112 | "version": "1.1.1", 1113 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", 1114 | "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" 1115 | }, 1116 | "socket.io": { 1117 | "version": "2.4.0", 1118 | "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.4.0.tgz", 1119 | "integrity": "sha512-9UPJ1UTvKayuQfVv2IQ3k7tCQC/fboDyIK62i99dAQIyHKaBsNdTpwHLgKJ6guRWxRtC9H+138UwpaGuQO9uWQ==", 1120 | "requires": { 1121 | "debug": "~4.1.0", 1122 | "engine.io": "~3.5.0", 1123 | "has-binary2": "~1.0.2", 1124 | "socket.io-adapter": "~1.1.0", 1125 | "socket.io-client": "2.4.0", 1126 | "socket.io-parser": "~3.4.0" 1127 | }, 1128 | "dependencies": { 1129 | "component-emitter": { 1130 | "version": "1.2.1", 1131 | "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", 1132 | "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=" 1133 | }, 1134 | "debug": { 1135 | "version": "4.1.1", 1136 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", 1137 | "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", 1138 | "requires": { 1139 | "ms": "^2.1.1" 1140 | } 1141 | }, 1142 | "ms": { 1143 | "version": "2.1.3", 1144 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 1145 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" 1146 | }, 1147 | "socket.io-parser": { 1148 | "version": "3.4.1", 1149 | "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.4.1.tgz", 1150 | "integrity": "sha512-11hMgzL+WCLWf1uFtHSNvliI++tcRUWdoeYuwIl+Axvwy9z2gQM+7nJyN3STj1tLj5JyIUH8/gpDGxzAlDdi0A==", 1151 | "requires": { 1152 | "component-emitter": "1.2.1", 1153 | "debug": "~4.1.0", 1154 | "isarray": "2.0.1" 1155 | } 1156 | } 1157 | } 1158 | }, 1159 | "socket.io-adapter": { 1160 | "version": "1.1.2", 1161 | "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-1.1.2.tgz", 1162 | "integrity": "sha512-WzZRUj1kUjrTIrUKpZLEzFZ1OLj5FwLlAFQs9kuZJzJi5DKdU7FsWc36SNmA8iDOtwBQyT8FkrriRM8vXLYz8g==" 1163 | }, 1164 | "socket.io-client": { 1165 | "version": "2.4.0", 1166 | "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.4.0.tgz", 1167 | "integrity": "sha512-M6xhnKQHuuZd4Ba9vltCLT9oa+YvTsP8j9NcEiLElfIg8KeYPyhWOes6x4t+LTAC8enQbE/995AdTem2uNyKKQ==", 1168 | "requires": { 1169 | "backo2": "1.0.2", 1170 | "component-bind": "1.0.0", 1171 | "component-emitter": "~1.3.0", 1172 | "debug": "~3.1.0", 1173 | "engine.io-client": "~3.5.0", 1174 | "has-binary2": "~1.0.2", 1175 | "indexof": "0.0.1", 1176 | "parseqs": "0.0.6", 1177 | "parseuri": "0.0.6", 1178 | "socket.io-parser": "~3.3.0", 1179 | "to-array": "0.1.4" 1180 | } 1181 | }, 1182 | "socket.io-parser": { 1183 | "version": "3.3.2", 1184 | "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.3.2.tgz", 1185 | "integrity": "sha512-FJvDBuOALxdCI9qwRrO/Rfp9yfndRtc1jSgVgV8FDraihmSP/MLGD5PEuJrNfjALvcQ+vMDM/33AWOYP/JSjDg==", 1186 | "requires": { 1187 | "component-emitter": "~1.3.0", 1188 | "debug": "~3.1.0", 1189 | "isarray": "2.0.1" 1190 | } 1191 | }, 1192 | "statuses": { 1193 | "version": "1.3.1", 1194 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", 1195 | "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=" 1196 | }, 1197 | "stream-throttle": { 1198 | "version": "0.1.3", 1199 | "resolved": "https://registry.npmjs.org/stream-throttle/-/stream-throttle-0.1.3.tgz", 1200 | "integrity": "sha1-rdV8jXzHOoFjDTHNVdOWHPr7qcM=", 1201 | "requires": { 1202 | "commander": "^2.2.0", 1203 | "limiter": "^1.0.5" 1204 | } 1205 | }, 1206 | "string-width": { 1207 | "version": "4.2.2", 1208 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", 1209 | "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", 1210 | "requires": { 1211 | "emoji-regex": "^8.0.0", 1212 | "is-fullwidth-code-point": "^3.0.0", 1213 | "strip-ansi": "^6.0.0" 1214 | }, 1215 | "dependencies": { 1216 | "ansi-regex": { 1217 | "version": "5.0.0", 1218 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", 1219 | "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" 1220 | }, 1221 | "strip-ansi": { 1222 | "version": "6.0.0", 1223 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", 1224 | "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", 1225 | "requires": { 1226 | "ansi-regex": "^5.0.0" 1227 | } 1228 | } 1229 | } 1230 | }, 1231 | "strip-ansi": { 1232 | "version": "3.0.1", 1233 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", 1234 | "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", 1235 | "requires": { 1236 | "ansi-regex": "^2.0.0" 1237 | } 1238 | }, 1239 | "supports-color": { 1240 | "version": "2.0.0", 1241 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", 1242 | "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" 1243 | }, 1244 | "symbol-observable": { 1245 | "version": "1.0.1", 1246 | "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", 1247 | "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=" 1248 | }, 1249 | "tfunk": { 1250 | "version": "4.0.0", 1251 | "resolved": "https://registry.npmjs.org/tfunk/-/tfunk-4.0.0.tgz", 1252 | "integrity": "sha512-eJQ0dGfDIzWNiFNYFVjJ+Ezl/GmwHaFTBTjrtqNPW0S7cuVDBrZrmzUz6VkMeCR4DZFqhd4YtLwsw3i2wYHswQ==", 1253 | "requires": { 1254 | "chalk": "^1.1.3", 1255 | "dlv": "^1.1.3" 1256 | } 1257 | }, 1258 | "to-array": { 1259 | "version": "0.1.4", 1260 | "resolved": "https://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz", 1261 | "integrity": "sha1-F+bBH3PdTz10zaek/zI46a2b+JA=" 1262 | }, 1263 | "to-regex-range": { 1264 | "version": "5.0.1", 1265 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", 1266 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", 1267 | "requires": { 1268 | "is-number": "^7.0.0" 1269 | } 1270 | }, 1271 | "toidentifier": { 1272 | "version": "1.0.0", 1273 | "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", 1274 | "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" 1275 | }, 1276 | "typescript": { 1277 | "version": "4.3.5", 1278 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz", 1279 | "integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==", 1280 | "dev": true 1281 | }, 1282 | "ua-parser-js": { 1283 | "version": "0.7.28", 1284 | "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.28.tgz", 1285 | "integrity": "sha512-6Gurc1n//gjp9eQNXjD9O3M/sMwVtN5S8Lv9bvOYBfKfDNiIIhqiyi01vMBO45u4zkDE420w/e0se7Vs+sIg+g==" 1286 | }, 1287 | "universalify": { 1288 | "version": "0.1.2", 1289 | "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", 1290 | "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" 1291 | }, 1292 | "unpipe": { 1293 | "version": "1.0.0", 1294 | "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", 1295 | "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" 1296 | }, 1297 | "utils-merge": { 1298 | "version": "1.0.1", 1299 | "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", 1300 | "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" 1301 | }, 1302 | "which-module": { 1303 | "version": "2.0.0", 1304 | "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", 1305 | "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" 1306 | }, 1307 | "wrap-ansi": { 1308 | "version": "7.0.0", 1309 | "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", 1310 | "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", 1311 | "requires": { 1312 | "ansi-styles": "^4.0.0", 1313 | "string-width": "^4.1.0", 1314 | "strip-ansi": "^6.0.0" 1315 | }, 1316 | "dependencies": { 1317 | "ansi-regex": { 1318 | "version": "5.0.0", 1319 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", 1320 | "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" 1321 | }, 1322 | "ansi-styles": { 1323 | "version": "4.3.0", 1324 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 1325 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 1326 | "requires": { 1327 | "color-convert": "^2.0.1" 1328 | } 1329 | }, 1330 | "strip-ansi": { 1331 | "version": "6.0.0", 1332 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", 1333 | "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", 1334 | "requires": { 1335 | "ansi-regex": "^5.0.0" 1336 | } 1337 | } 1338 | } 1339 | }, 1340 | "ws": { 1341 | "version": "7.4.6", 1342 | "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", 1343 | "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==" 1344 | }, 1345 | "xmlhttprequest-ssl": { 1346 | "version": "1.6.3", 1347 | "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.6.3.tgz", 1348 | "integrity": "sha512-3XfeQE/wNkvrIktn2Kf0869fC0BN6UpydVasGIeSm2B1Llihf7/0UfZM+eCkOw3P7bP4+qPgqhm7ZoxuJtFU0Q==" 1349 | }, 1350 | "y18n": { 1351 | "version": "5.0.8", 1352 | "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", 1353 | "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==" 1354 | }, 1355 | "yargs": { 1356 | "version": "15.4.1", 1357 | "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", 1358 | "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", 1359 | "requires": { 1360 | "cliui": "^6.0.0", 1361 | "decamelize": "^1.2.0", 1362 | "find-up": "^4.1.0", 1363 | "get-caller-file": "^2.0.1", 1364 | "require-directory": "^2.1.1", 1365 | "require-main-filename": "^2.0.0", 1366 | "set-blocking": "^2.0.0", 1367 | "string-width": "^4.2.0", 1368 | "which-module": "^2.0.0", 1369 | "y18n": "^4.0.0", 1370 | "yargs-parser": "^18.1.2" 1371 | }, 1372 | "dependencies": { 1373 | "ansi-regex": { 1374 | "version": "5.0.0", 1375 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", 1376 | "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" 1377 | }, 1378 | "ansi-styles": { 1379 | "version": "4.3.0", 1380 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 1381 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 1382 | "requires": { 1383 | "color-convert": "^2.0.1" 1384 | } 1385 | }, 1386 | "cliui": { 1387 | "version": "6.0.0", 1388 | "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", 1389 | "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", 1390 | "requires": { 1391 | "string-width": "^4.2.0", 1392 | "strip-ansi": "^6.0.0", 1393 | "wrap-ansi": "^6.2.0" 1394 | } 1395 | }, 1396 | "strip-ansi": { 1397 | "version": "6.0.0", 1398 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", 1399 | "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", 1400 | "requires": { 1401 | "ansi-regex": "^5.0.0" 1402 | } 1403 | }, 1404 | "wrap-ansi": { 1405 | "version": "6.2.0", 1406 | "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", 1407 | "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", 1408 | "requires": { 1409 | "ansi-styles": "^4.0.0", 1410 | "string-width": "^4.1.0", 1411 | "strip-ansi": "^6.0.0" 1412 | } 1413 | }, 1414 | "y18n": { 1415 | "version": "4.0.3", 1416 | "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", 1417 | "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==" 1418 | }, 1419 | "yargs-parser": { 1420 | "version": "18.1.3", 1421 | "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", 1422 | "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", 1423 | "requires": { 1424 | "camelcase": "^5.0.0", 1425 | "decamelize": "^1.2.0" 1426 | } 1427 | } 1428 | } 1429 | }, 1430 | "yargs-parser": { 1431 | "version": "20.2.9", 1432 | "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", 1433 | "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==" 1434 | }, 1435 | "yeast": { 1436 | "version": "0.1.2", 1437 | "resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz", 1438 | "integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk=" 1439 | } 1440 | } 1441 | } 1442 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "aula-dio", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "start": "lite-server", 9 | "watch": "tsc --watch" 10 | }, 11 | "author": "", 12 | "license": "ISC", 13 | "dependencies": { 14 | "lite-server": "^2.6.1" 15 | }, 16 | "devDependencies": { 17 | "typescript": "^4.3.5" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/app.ts: -------------------------------------------------------------------------------- 1 | console.log('Arquivo de testes. Pode mexer nele como quiser.') -------------------------------------------------------------------------------- /src/desafios/desafio1.js: -------------------------------------------------------------------------------- 1 | // Como podemos rodar isso em um arquivo .ts sem causar erros? 2 | 3 | let employee = {}; 4 | employee.code = 10; 5 | employee.name = "John"; -------------------------------------------------------------------------------- /src/desafios/desafio2.js: -------------------------------------------------------------------------------- 1 | // Como podemos melhorar o esse código usando TS? 2 | 3 | let pessoa1 = {}; 4 | pessoa1.nome = "maria"; 5 | pessoa1.idade = 29; 6 | pessoa1.profissao = "atriz" 7 | 8 | let pessoa2 = {} 9 | pessoa2.nome = "roberto"; 10 | pessoa2.idade = 19; 11 | pessoa2.profissao = "Padeiro"; 12 | 13 | let pessoa3 = { 14 | nome: "laura", 15 | idade: "32", 16 | profissao: "Atriz" 17 | }; 18 | 19 | let pessoa4 = { 20 | nome = "carlos", 21 | idade = 19, 22 | profissao = "padeiro" 23 | } -------------------------------------------------------------------------------- /src/desafios/desafio3.js: -------------------------------------------------------------------------------- 1 | // O código abaixo tem alguns erros e não funciona como deveria. Você pode identificar quais são e corrigi-los em um arquivo TS? 2 | 3 | let botaoAtualizar = document.getElementById('atualizar-saldo'); 4 | let botaoLimpar = document.getElementById('limpar-saldo'); 5 | let soma = document.getElementById('soma'); 6 | let campoSaldo = document.getElementById('campo-saldo'); 7 | 8 | campoSaldo.innerHTML = 0 9 | 10 | function somarAoSaldo(soma) { 11 | campoSaldo.innerHTML += soma; 12 | } 13 | 14 | function limparSaldo() { 15 | campoSaldo.innerHTML = ''; 16 | } 17 | 18 | botaoAtualizar.addEventListener('click', function () { 19 | somarAoSaldo(soma.value); 20 | }); 21 | 22 | botaoLimpar.addEventListener('click', function () { 23 | limparSaldo(); 24 | }); 25 | 26 | /** 27 |

Valor a ser adicionado:

28 | 29 | 30 |

"Seu saldo é: "

31 | */ -------------------------------------------------------------------------------- /src/desafios/desafio4.js: -------------------------------------------------------------------------------- 1 | // Um desenvolvedor tentou criar um projeto que consome a base de dados de filme do TMDB para criar um organizador de filmes, mas desistiu 2 | // pois considerou o seu código inviável. Você consegue usar typescript para organizar esse código e a partir daí aprimorar o que foi feito? 3 | 4 | // A ideia dessa atividade é criar um aplicativo que: 5 | // - Busca filmes 6 | // - Apresenta uma lista com os resultados pesquisados 7 | // - Permite a criação de listas de filmes e a posterior adição de filmes nela 8 | 9 | // Todas as requisições necessárias para as atividades acima já estão prontas, mas a implementação delas ficou pela metade (não vou dar tudo de graça). 10 | // Atenção para o listener do botão login-button que devolve o sessionID do usuário 11 | // É necessário fazer um cadastro no https://www.themoviedb.org/ e seguir a documentação do site para entender como gera uma API key https://developers.themoviedb.org/3/getting-started/introduction 12 | 13 | var apiKey = '3f301be7381a03ad8d352314dcc3ec1d'; 14 | let apiKey; 15 | let requestToken; 16 | let username; 17 | let password; 18 | let sessionId; 19 | let listId = '7101979'; 20 | 21 | let loginButton = document.getElementById('login-button'); 22 | let searchButton = document.getElementById('search-button'); 23 | let searchContainer = document.getElementById('search-container'); 24 | 25 | loginButton.addEventListener('click', async () => { 26 | await criarRequestToken(); 27 | await logar(); 28 | await criarSessao(); 29 | }) 30 | 31 | searchButton.addEventListener('click', async () => { 32 | let lista = document.getElementById("lista"); 33 | if (lista) { 34 | lista.outerHTML = ""; 35 | } 36 | let query = document.getElementById('search').value; 37 | let listaDeFilmes = await procurarFilme(query); 38 | let ul = document.createElement('ul'); 39 | ul.id = "lista" 40 | for (const item of listaDeFilmes.results) { 41 | let li = document.createElement('li'); 42 | li.appendChild(document.createTextNode(item.original_title)) 43 | ul.appendChild(li) 44 | } 45 | console.log(listaDeFilmes); 46 | searchContainer.appendChild(ul); 47 | }) 48 | 49 | function preencherSenha() { 50 | password = document.getElementById('senha').value; 51 | validateLoginButton(); 52 | } 53 | 54 | function preencherLogin() { 55 | username = document.getElementById('login').value; 56 | validateLoginButton(); 57 | } 58 | 59 | function preencherApi() { 60 | apiKey = document.getElementById('api-key').value; 61 | validateLoginButton(); 62 | } 63 | 64 | function validateLoginButton() { 65 | if (password && username && apiKey) { 66 | loginButton.disabled = false; 67 | } else { 68 | loginButton.disabled = true; 69 | } 70 | } 71 | 72 | class HttpClient { 73 | static async get({url, method, body = null}) { 74 | return new Promise((resolve, reject) => { 75 | let request = new XMLHttpRequest(); 76 | request.open(method, url, true); 77 | 78 | request.onload = () => { 79 | if (request.status >= 200 && request.status < 300) { 80 | resolve(JSON.parse(request.responseText)); 81 | } else { 82 | reject({ 83 | status: request.status, 84 | statusText: request.statusText 85 | }) 86 | } 87 | } 88 | request.onerror = () => { 89 | reject({ 90 | status: request.status, 91 | statusText: request.statusText 92 | }) 93 | } 94 | 95 | if (body) { 96 | request.setRequestHeader("Content-Type", "application/json;charset=UTF-8"); 97 | body = JSON.stringify(body); 98 | } 99 | request.send(body); 100 | }) 101 | } 102 | } 103 | 104 | async function procurarFilme(query) { 105 | query = encodeURI(query) 106 | console.log(query) 107 | let result = await HttpClient.get({ 108 | url: `https://api.themoviedb.org/3/search/movie?api_key=${apiKey}&query=${query}`, 109 | method: "GET" 110 | }) 111 | return result 112 | } 113 | 114 | async function adicionarFilme(filmeId) { 115 | let result = await HttpClient.get({ 116 | url: `https://api.themoviedb.org/3/movie/${filmeId}?api_key=${apiKey}&language=en-US`, 117 | method: "GET" 118 | }) 119 | console.log(result); 120 | } 121 | 122 | async function criarRequestToken () { 123 | let result = await HttpClient.get({ 124 | url: `https://api.themoviedb.org/3/authentication/token/new?api_key=${apiKey}`, 125 | method: "GET" 126 | }) 127 | requestToken = result.request_token 128 | } 129 | 130 | async function logar() { 131 | await HttpClient.get({ 132 | url: `https://api.themoviedb.org/3/authentication/token/validate_with_login?api_key=${apiKey}`, 133 | method: "POST", 134 | body: { 135 | username: `${username}`, 136 | password: `${password}`, 137 | request_token: `${requestToken}` 138 | } 139 | }) 140 | } 141 | 142 | async function criarSessao() { 143 | let result = await HttpClient.get({ 144 | url: `https://api.themoviedb.org/3/authentication/session/new?api_key=${apiKey}&request_token=${requestToken}`, 145 | method: "GET" 146 | }) 147 | sessionId = result.session_id; 148 | } 149 | 150 | async function criarLista(nomeDaLista, descricao) { 151 | let result = await HttpClient.get({ 152 | url: `https://api.themoviedb.org/3/list?api_key=${apiKey}&session_id=${sessionId}`, 153 | method: "POST", 154 | body: { 155 | name: nomeDaLista, 156 | description: descricao, 157 | language: "pt-br" 158 | } 159 | }) 160 | console.log(result); 161 | } 162 | 163 | async function adicionarFilmeNaLista(filmeId, listaId) { 164 | let result = await HttpClient.get({ 165 | url: `https://api.themoviedb.org/3/list/${listaId}/add_item?api_key=${apiKey}&session_id=${sessionId}`, 166 | method: "POST", 167 | body: { 168 | media_id: filmeId 169 | } 170 | }) 171 | console.log(result); 172 | } 173 | 174 | async function pegarLista() { 175 | let result = await HttpClient.get({ 176 | url: `https://api.themoviedb.org/3/list/${listId}?api_key=${apiKey}`, 177 | method: "GET" 178 | }) 179 | console.log(result); 180 | } 181 | 182 | {/*
183 |
184 | 185 | 186 | 187 | 188 |
189 |
190 | 191 | 192 |
193 |
*/} -------------------------------------------------------------------------------- /src/exemplos/any-vs-unknown-e-never.ts: -------------------------------------------------------------------------------- 1 | let valor: unknown; // unknown é um tipo que pode receber qualquer valor 2 | valor = 5; 3 | valor = 'Max'; 4 | let nome: string; 5 | 6 | // nome = valor; Isso não vai funcionar. O tipo unknown não pode ser arbitrariamente atribuído 7 | if (typeof valor === 'string') { 8 | nome = valor; // Isso funciona. Esse tipo só pode ser atribuido se uma validação for feita 9 | } 10 | 11 | let valorAny: any; // Como já foi visto, o any também recebe qualquer valor 12 | valorAny = true; 13 | valorAny = 10 14 | nome = valorAny; // O perigo é que o any pode ser atribuído a qualquer variável tipada sem que seu tipo seja verificado 15 | 16 | // Não é uma prática ruim usar unknown, já que ele força uma validação de tipos. Diferente do any, que como já vimos pode ser usado sem se preocupar com tipage. 17 | 18 | function geradorDeErro(mensagem: string, codigoDeErro: number): never { // never quer dizer que o script pode ser interrompido ou nunca chegar a um fim 19 | throw {message: mensagem, errorCode: codigoDeErro }; // Nesse caso ele foi interrompido 20 | } 21 | 22 | geradorDeErro('Um erro ocorreu!', 500); // O mesmo tipo poderia ser usado se fosse usado um while loop que nunca é finalizado -------------------------------------------------------------------------------- /src/exemplos/any.ts: -------------------------------------------------------------------------------- 1 | // O any é uma notação que diz que a propriedade pode ter qualquer tipo 2 | let cpf: any; 3 | // Aqui ela recebe uma string 4 | cpf = '01620445000'; 5 | // Aqui recebe um boolean 6 | cpf = true; 7 | // E agora um número 8 | cpf = 10; 9 | // O uso de any faz com que typescript trate suas variáveis como JS 10 | 11 | // Essa função abaixo espera uma string 12 | function apresentarCPF(cpf: string) { 13 | console.log(cpf) 14 | } 15 | 16 | // E aqui passamos a variável cpf que contém um number, mas como ela é um any, o TS não reclama porque ela pode conter qualquer atributo, inclusive uma string 17 | apresentarCPF(cpf); 18 | /** 19 | Usar any tira poder do typescript e pode criar incoerências no seu projeto 20 | O any é comumente usado quando um objeto desconhecido é manipulado, ou quando uma refatoração de JS para TS é aplicada rapidamente sem tipar os objetos utilizados 21 | É uma má prática que reduz a velocidade dos times no longo prazo e foge do propósito do typescript 22 | Com o uso do ESLint é possível configurar seu projeto para não permitir o uso explícito de any 23 | */ -------------------------------------------------------------------------------- /src/exemplos/basico.ts: -------------------------------------------------------------------------------- 1 | const button = document.getElementById('button'); 2 | const input1 = document.getElementById('input1') as HTMLInputElement; 3 | const input2 = document.getElementById('input2') as HTMLInputElement; 4 | 5 | /** 6 | * Exemplo de função com parâmetros tipados 7 | */ 8 | function somaValidaComPrint(numero1: number, numero2: number, printarResultado: boolean, frase: string) { 9 | const resultado = numero1 + numero2; 10 | if (printarResultado) { 11 | console.log(frase + resultado); 12 | } 13 | return resultado; 14 | } 15 | 16 | // A variável abaixo tem seu tipo inferido pelo valor inicial 17 | let printarResultado = true; 18 | // já nesse caso estamos dizendo explicitamente qual é o seu tipo 19 | let frase: string; 20 | // E só depois iniciamos ela com um valor 21 | frase = "O número é "; 22 | 23 | // Como a busca pelo button na linha 1 pode trazer um null (já que esse id pode não estar presente no index.html), é importante confirmar se ele tem um valor 24 | if (button) { 25 | button.addEventListener('click', () => { 26 | console.log(somaValidaComPrint(Number(input1.value), Number(input2.value), printarResultado, frase)); 27 | }); 28 | } -------------------------------------------------------------------------------- /src/exemplos/combinando.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Quando tipamos podemos passar mais de um tipo, como no caso abaixo em que cada parâmetro contém o tipo input, que é igual aos tipos number ou string 3 | * No exemplo abaixo também ocorre um tratamento interno na função para que ela lide com os diferentes tipos de cada parâmetro 4 | */ 5 | 6 | // Também é possível criar tipos! E combinar tipos com esses tipos! 7 | type input = number | string; 8 | 9 | function juntar(input1: input, input2: input) { 10 | let resultado: input; 11 | if (typeof input1 === 'string' || typeof input2 === 'string') { 12 | resultado = input1.toString() + input2.toString(); 13 | } else { 14 | resultado = input1 + input2 15 | } 16 | return resultado; 17 | } 18 | 19 | // E aqui temos dois exemplos de uma chamada para essa função, um com strings e um com números 20 | console.log(juntar('bom ', 'dia')); 21 | console.log(juntar(1, 2)); 22 | -------------------------------------------------------------------------------- /src/exemplos/enum.ts: -------------------------------------------------------------------------------- 1 | const sarah = { 2 | name: 'Sarah', 3 | idade: 26, 4 | casado: true, 5 | trabalho: 'Engenheira' // Nesse campo é dito que a sarah trabalha como 'Engenheira' 6 | } 7 | 8 | const maria = { 9 | name: 'Maria', 10 | idade: 23, 11 | casado: false, 12 | trabalho: 'engenheira' // E aqui é dito que maria trabalha como 'engenheira'. 13 | } 14 | 15 | // Isso está correto? Existe diferença entre 'Engenheira' e 'engenheira'? Acredito que não. Isso deve ter sido um erro cometido em desenvolvimento. 16 | 17 | // Para resolver isso vamos usar a feature Enum do TypeScript para criar o enum Profissao 18 | enum Profissao { 19 | Professor, 20 | Engenheiro, 21 | Pintor, 22 | Porteiro 23 | } 24 | 25 | // E para garantir que o enum vai ser usado corretamente, vamos criar um tipo Pessoa também 26 | type Pessoa = { 27 | name: string, 28 | idade: number, 29 | casado: boolean, 30 | trabalho: Profissao // Aqui inserimos o enum como um tipo 31 | } 32 | 33 | const gabriel: Pessoa = { 34 | name: 'Gabriel', 35 | idade: 26, 36 | casado: false, 37 | trabalho: Profissao.Engenheiro // E aqui usamos ele para definir de forma padronizada a profissão de cada objeto do tipo Pessoa 38 | } 39 | 40 | const mario: Pessoa = { 41 | name: 'Mario', 42 | idade: 26, 43 | casado: false, 44 | trabalho: Profissao.Engenheiro // Tudo padronizado e consistente 45 | } -------------------------------------------------------------------------------- /src/exemplos/exemplo-validacao.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Caso algum dos Ids abaixo não esteja presente no index.html, a função não vai retornar os itens e isso pode causar erros no resto do arquivo. 3 | */ 4 | const button = document.getElementById('button'); 5 | const input1 = document.getElementById('input1'); 6 | const input2 = document.getElementById('input2'); 7 | 8 | /** 9 | * A função abaixo não valida se os itens somados são número. Logo situações inesperadas podem ocorrer. 10 | * Por exemplo, somarSemValidar(1, "3") vai devolver "13" 11 | */ 12 | function somarSemValidar(numero1, numero2) { 13 | return numero1 + numero2; 14 | } 15 | 16 | button.addEventListener('click', () => { 17 | console.log(somarSemValidar(input1.value, input2.value)); 18 | }); 19 | 20 | /** 21 | * Na função abaixo uma validação é feita para confirmar se os itens são números e é feita uma conversão caso não sejam. 22 | */ 23 | function somarValidando(numero1, numero2) { 24 | if (typeof numero1 !== 'number' || typeof numero2 !== 'number') { 25 | return +numero1 + +numero2; 26 | } else { 27 | return numero1 + numero2; 28 | } 29 | } 30 | 31 | button.addEventListener('click', () => { 32 | console.log(printarSomaValida(input1.value, input2.value)); 33 | }); -------------------------------------------------------------------------------- /src/exemplos/functions.ts: -------------------------------------------------------------------------------- 1 | // Como já vimos antes, O typescript infere bastante. Nesse caso ele infere que o retorno dessa função é do tipo number 2 | function adicionar(n1: number, n2: number) { 3 | return n1 + n2; 4 | } 5 | 6 | let resultado: number; 7 | // Por ter inferido que o retorno é um number, a função pode ser usada para atribuir valor para resultado, que é do mesmo tipo. 8 | resultado = adicionar(1, 4); 9 | 10 | /** 11 | * Aqui temos uma função que retorna uma string por causa do uso de toString(). Ela é praticamente igual a função acima, com apenas uma pequena alteração diferindo as duas 12 | * Como o dia a dia dos desenvolvedores é corrido, pequenas mudanças como essa podem ocorrer o tempo todo alterando uma função 13 | * Essa estrutura parece frágil e suscetível a erros e não é isso que queremos com typescript 14 | */ 15 | function adicionarNumeros(n1: number, n2: number) { 16 | return n1.toString() + n2; 17 | } 18 | /** 19 | * resultado = adicionarNumeros(1, 4); 20 | * No caso acima um erro vai ser apresentado porque, por inferência, o retorno de adicionarNumeros é do tipo string e resultado espera um number 21 | * Então temos um problema aqui, porque funções podem ser alteradas e isso pode implicar em erros em outras partes do código. 22 | */ 23 | 24 | // Uma solução para isso é explicitamente tipar o retorno de uma função. Se algo for modificado dentro dela, o próprio TS pode reclamar caso o retorno não seja number 25 | function adicionarExplicitamenteNumber(n1: number, n2: number): number { 26 | return n1 + n2; 27 | } 28 | 29 | resultado = adicionarExplicitamenteNumber(1, 4); 30 | 31 | // Funções também podem não retornar nada, que é o caso do tipo void 32 | function printarValor(num: number): void { 33 | console.log('O valor é '+ num) 34 | } 35 | 36 | printarValor(3); 37 | 38 | function multiplicarValorPor2(numero: number) { 39 | return numero * 2; 40 | } 41 | /** 42 | * Funções também podem ser passadas como parâmetro. O tipo delas é estruturado assim: 43 | * (parâmetro: tipo do parâmetro) => tipo do retorno 44 | */ 45 | function adicionarETratar(n1: number, n2: number, callback: (num: number) => void) { 46 | resultado = n1 + n2; 47 | callback(resultado); // Aqui ela é chamada 48 | } 49 | 50 | adicionarETratar(1, 5, printarValor); 51 | console.log(adicionarETratar(1, 5, multiplicarValorPor2)); -------------------------------------------------------------------------------- /src/exemplos/objetos.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * A inferência de tipo também funciona para objetos. 3 | * Se estiver usando o visual studio code, tente passar o mouse por cima de um objeto não tipado e veja a mágica. 4 | */ 5 | const desenvolvedor = { 6 | name: 'Marco', 7 | idade: 25, 8 | salario: 15000 9 | } 10 | 11 | /** 12 | * desenvolvedor.salario = "não tem" devolveria um erro, pois foi inferido que desenvolvedor.salario é do tipo number 13 | * Assim percebemos que enquanto o objeto pode ser escrito de qualquer forma, o uso posterior tem que respeitar a forma como ele foi inicializado 14 | */ 15 | 16 | // Nesse caso abaixo a tipagem foi explícita, então é necessário respeitar o tipo durante a criação do objeto. 17 | const carro: {cor: string, numeroDoPneu: number, conversivel: boolean} = { 18 | cor: 'vermelho', 19 | numeroDoPneu: 10, 20 | conversivel: true 21 | } 22 | 23 | /** 24 | * Com esses dois exemplos percebemos que objetos seguem as mesmas regras de variáveis comuns 25 | * Ambos podem ser inicializadas de qualquer forma, mas depois precisam respeitar o tipo 26 | * E caso sejam tipados no início, seu primeiro valor tem que respeitar esse tipo 27 | */ 28 | 29 | // Vamos usar pela primeira vez o tipo lista 30 | const estudante: {nome: string, idade: number, materias: string[]} = { 31 | nome: 'Amanda', 32 | idade: 24, 33 | materias: ['Algoritmos', 'Lógica para computação'] 34 | } 35 | 36 | function listar(lista: string[]) { 37 | for (const item of lista) { 38 | console.log('- ' + item) 39 | } 40 | } 41 | 42 | // A função reconhece estudante.materias como string[] 43 | listar(estudante.materias) 44 | -------------------------------------------------------------------------------- /src/respostas/desafio1.ts: -------------------------------------------------------------------------------- 1 | // Resposta 1 2 | const funcionario = { 3 | codigo: 10, 4 | nome: 'João' 5 | }; 6 | 7 | // Resposta 2 8 | const funcionario2: {codigo: number, nome: string} = { 9 | codigo: 10, 10 | nome: 'joao' 11 | } 12 | 13 | // Respostas 3 e 4 14 | interface Funcionario { // Já conhece interfaces? https://blog.logrocket.com/types-vs-interfaces-in-typescript/ 15 | codigo: number, 16 | nome: string 17 | }; 18 | 19 | const funcionarioObj = {} as Funcionario; 20 | funcionarioObj.codigo = 10; 21 | funcionarioObj.nome = 'João'; 22 | 23 | const funcionarioObj2: Funcionario = { 24 | codigo: 10, 25 | nome: 'João' 26 | } -------------------------------------------------------------------------------- /src/respostas/desafio2.ts: -------------------------------------------------------------------------------- 1 | 2 | enum Trabalho { 3 | Atriz, 4 | Padeiro 5 | } 6 | 7 | type Humano = { 8 | nome: string, 9 | idade: number, 10 | profissao: Trabalho 11 | } 12 | 13 | let pessoa1: Humano = { 14 | nome: 'maria', 15 | idade: 29, 16 | profissao: Trabalho.Atriz 17 | }; 18 | 19 | let pessoa2: Humano = { 20 | nome: 'roberto', 21 | idade: 19, 22 | profissao: Trabalho.Padeiro 23 | }; 24 | 25 | let pessoa3: Humano = { 26 | nome: 'laura', 27 | idade: 32, 28 | profissao: Trabalho.Atriz 29 | }; 30 | 31 | let pessoa4: Humano = { 32 | nome: "carlos", 33 | idade: 19, 34 | profissao: Trabalho.Padeiro 35 | } -------------------------------------------------------------------------------- /src/respostas/desafio3.ts: -------------------------------------------------------------------------------- 1 | export {} // Para não reclamar de variáveis duplicadas 2 | /** 3 | Em todos os casos abaixo de uso do getElementById(), o elemento é potencialmente nulo e ifs são necessários para garantir que seu código vai funcionar da melhor forma. 4 | No entanto, vão existir situações em que o desenvolvedor vai ter certeza de que o campo está lá e ele pode escrever o código da seguinte maneira: 5 | document.getElementById('limpar-saldo')!; 6 | A exclamação no fim é um sinal de que aquele campo não é nulo e que essa função realmente vai trazer algo. Assim, os ifs não são necessários. 7 | Como exemplo, vou seguir essa metodologia no campo 'botaoLimpar'. 8 | */ 9 | let botaoAtualizar = document.getElementById('atualizar-saldo'); 10 | let botaoLimpar = document.getElementById('limpar-saldo')!; 11 | let soma = document.getElementById('soma')! as HTMLInputElement; 12 | let campoSaldo = document.getElementById('campo-saldo'); 13 | 14 | let saldoTotal = 0 15 | 16 | limparSaldo() 17 | 18 | function somarAoSaldo(soma: number) { 19 | if (campoSaldo) { 20 | saldoTotal += soma 21 | campoSaldo.innerHTML = saldoTotal.toString(); 22 | limparCampoSoma(); 23 | } 24 | } 25 | 26 | function limparCampoSoma() { 27 | soma.value = ""; 28 | } 29 | 30 | function limparSaldo() { 31 | if (campoSaldo) { 32 | saldoTotal = 0; 33 | campoSaldo.innerHTML = saldoTotal.toString(); 34 | } 35 | } 36 | 37 | if (botaoAtualizar) { 38 | botaoAtualizar.addEventListener('click', () => { 39 | somarAoSaldo(Number(soma.value)); 40 | }); 41 | } 42 | botaoLimpar.addEventListener('click', () => { // Percebam que aqui o typescript não acusou o botao de ser nulo e não precisei do if. Caso queiram fazer o teste, retirem a exclamação. 43 | limparSaldo(); 44 | }); 45 | 46 | /** 47 |

Valor a ser adicionado:

48 | 49 | 50 |

"Seu saldo é: "

51 | */ -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | /* Visit https://aka.ms/tsconfig.json to read more about this file */ 4 | 5 | /* Basic Options */ 6 | // "incremental": true, /* Enable incremental compilation */ 7 | "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. */ 8 | "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ 9 | "lib": [ 10 | "dom", 11 | "es6", 12 | "DOM.Iterable", 13 | "ScriptHost" 14 | ], /* Specify library files to be included in the compilation. */ 15 | "allowJs": false, /* Allow javascript files to be compiled. */ 16 | "checkJs": false, /* Report errors in .js files. */ 17 | // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', 'react', 'react-jsx' or 'react-jsxdev'. */ 18 | // "declaration": true, /* Generates corresponding '.d.ts' file. */ 19 | // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ 20 | "sourceMap": true, /* Generates corresponding '.map' file. */ 21 | // "outFile": "./", /* Concatenate and emit output to single file. */ 22 | "outDir": "dist", /* Redirect output structure to the directory. */ 23 | "rootDir": "src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ 24 | // "composite": true, /* Enable project compilation */ 25 | // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ 26 | // "removeComments": true, /* Do not emit comments to output. */ 27 | // "noEmit": true, /* Do not emit outputs. */ 28 | // "importHelpers": true, /* Import emit helpers from 'tslib'. */ 29 | // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ 30 | // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ 31 | 32 | /* Strict Type-Checking Options */ 33 | "strict": true, /* Enable all strict type-checking options. */ 34 | // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ 35 | // "strictNullChecks": true, /* Enable strict null checks. */ 36 | // "strictFunctionTypes": true, /* Enable strict checking of function types. */ 37 | // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ 38 | // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ 39 | // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ 40 | // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ 41 | 42 | /* Additional Checks */ 43 | // "noUnusedLocals": true, /* Report errors on unused locals. */ 44 | // "noUnusedParameters": true, /* Report errors on unused parameters. */ 45 | // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ 46 | // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ 47 | // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */ 48 | // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an 'override' modifier. */ 49 | // "noPropertyAccessFromIndexSignature": true, /* Require undeclared properties from index signatures to use element accesses. */ 50 | 51 | /* Module Resolution Options */ 52 | // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ 53 | // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ 54 | // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ 55 | // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ 56 | // "typeRoots": [], /* List of folders to include type definitions from. */ 57 | // "types": [], /* Type declaration files to be included in compilation. */ 58 | // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ 59 | "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ 60 | // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ 61 | // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ 62 | 63 | /* Source Map Options */ 64 | // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ 65 | // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ 66 | // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ 67 | // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ 68 | 69 | /* Experimental Options */ 70 | // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ 71 | // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ 72 | 73 | /* Advanced Options */ 74 | "skipLibCheck": true, /* Skip type checking of declaration files. */ 75 | "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ 76 | }, 77 | "include": ["src/**/*.ts", "src/desafios/desafio4.js"], 78 | "exclude": ["src/respostas"] 79 | } --------------------------------------------------------------------------------