From 4afb4b6e46de2ed536a3c9828d70d7799b5b6d03 Mon Sep 17 00:00:00 2001 From: Luca Casonato Date: Fri, 31 Jul 2020 11:12:20 +0200 Subject: feat: add $STD_VERSION replacement variable in docs (#6922) --- docs/standard_library.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'docs/standard_library.md') diff --git a/docs/standard_library.md b/docs/standard_library.md index 6f11a68d6..ada5b36e7 100644 --- a/docs/standard_library.md +++ b/docs/standard_library.md @@ -27,7 +27,7 @@ change: ```typescript // imports from v0.50.0 of std, never changes -import { copy } from "https://deno.land/std@0.50.0/fs/copy.ts"; +import { copy } from "https://deno.land/std@$STD_VERSION/fs/copy.ts"; ``` ## Troubleshooting @@ -40,7 +40,7 @@ exist: ```typescript // main.ts -import { copy } from "https://deno.land/std@0.50.0/fs/copy.ts"; +import { copy } from "https://deno.land/std@$STD_VERSION/fs/copy.ts"; copy("log.txt", "log-old.txt"); ``` @@ -48,18 +48,18 @@ copy("log.txt", "log-old.txt"); ```shell $ deno run --allow-read --allow-write main.ts Compile file:///dev/deno/main.ts -Download https://deno.land/std@0.50.0/fs/copy.ts -Download https://deno.land/std@0.50.0/fs/ensure_dir.ts -Download https://deno.land/std@0.50.0/fs/_util.ts +Download https://deno.land/std@$STD_VERSION/fs/copy.ts +Download https://deno.land/std@$STD_VERSION/fs/ensure_dir.ts +Download https://deno.land/std@$STD_VERSION/fs/_util.ts error: TS2339 [ERROR]: Property 'utime' does not exist on type 'typeof Deno'. await Deno.utime(dest, statInfo.atime, statInfo.mtime); ~~~~~ - at https://deno.land/std@0.50.0/fs/copy.ts:90:16 + at https://deno.land/std@$STD_VERSION/fs/copy.ts:90:16 TS2339 [ERROR]: Property 'utimeSync' does not exist on type 'typeof Deno'. Deno.utimeSync(dest, statInfo.atime, statInfo.mtime); ~~~~~~~~~ - at https://deno.land/std@0.50.0/fs/copy.ts:101:10 + at https://deno.land/std@$STD_VERSION/fs/copy.ts:101:10 ``` Solution to that problem requires adding `--unstable` flag: -- cgit v1.2.3