From 19679456c7c9675011221684fa8e33a69ce496c3 Mon Sep 17 00:00:00 2001 From: Glenn Prince <35242574+GlennPrince@users.noreply.github.com> Date: Fri, 20 May 2022 18:30:43 -0600 Subject: [PATCH] Fixes the azure-ts-webserver example so it now builds - Issue #1221 (#1222) * Fixes the azure-ts-webserver example so it now builds - Issue #1221 * Turn on strict mode in the example Co-authored-by: Glenn Prince Co-authored-by: Ian Wahbe --- azure-ts-webserver/index.ts | 2 +- azure-ts-webserver/tsconfig.json | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/azure-ts-webserver/index.ts b/azure-ts-webserver/index.ts index 5fba87240..9fdce9297 100644 --- a/azure-ts-webserver/index.ts +++ b/azure-ts-webserver/index.ts @@ -34,7 +34,7 @@ const networkInterface = new network.NetworkInterface("server-nic", { resourceGroupName, ipConfigurations: [{ name: "webserveripcfg", - subnet: { id: virtualNetwork.subnets[0].id }, + subnet: virtualNetwork.subnets.apply(subnet => subnet![0]), privateIPAllocationMethod: network.IPAllocationMethod.Dynamic, publicIPAddress: { id: publicIp.id }, }], diff --git a/azure-ts-webserver/tsconfig.json b/azure-ts-webserver/tsconfig.json index 2e7b580d6..cd30645df 100644 --- a/azure-ts-webserver/tsconfig.json +++ b/azure-ts-webserver/tsconfig.json @@ -1,6 +1,7 @@ { "compilerOptions": { "outDir": "bin", + "strict": true, "target": "es2016", "module": "commonjs", "moduleResolution": "node", @@ -8,9 +9,9 @@ "experimentalDecorators": true, "pretty": true, "noFallthroughCasesInSwitch": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true }, "files": [ - "index.ts", + "index.ts" ] }