From d0f71c75305b385039475c1e0e012f4eee42a9c8 Mon Sep 17 00:00:00 2001 From: 1computer1 Date: Fri, 19 Jun 2020 09:34:30 -0400 Subject: [PATCH] lang(typescript): add node types --- languages/typescript/Dockerfile | 2 +- languages/typescript/run.sh | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/languages/typescript/Dockerfile b/languages/typescript/Dockerfile index 4313d54..f1eb610 100644 --- a/languages/typescript/Dockerfile +++ b/languages/typescript/Dockerfile @@ -1,6 +1,6 @@ FROM node:alpine LABEL author="1Computer1" -RUN yarn global add typescript +RUN yarn global add typescript @types/node COPY run.sh /var/run/ diff --git a/languages/typescript/run.sh b/languages/typescript/run.sh index 12098b5..4d12a04 100644 --- a/languages/typescript/run.sh +++ b/languages/typescript/run.sh @@ -1,2 +1,4 @@ cat > program.ts -tsc --lib DOM,ESNext --target ES2019 --strict --skipLibCheck program.ts && cat program.js | node -p +tsc --lib DOM,ESNext --target ES2019 --strict \ + --skipLibCheck --types /usr/local/share/.config/yarn/global/node_modules/@types/node program.ts \ + && cat program.js | node -p