diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2023-08-01 11:27:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-01 15:27:25 +0000 |
commit | b563746885f8548676953536987012012b08646d (patch) | |
tree | 955f0a18380196463a46ec1d6197bde1132e5115 /cli/tsc | |
parent | 5df2b0b4dc17cdccaada24ab3993c8983cabc925 (diff) |
fix: deno diagnostic - clarify where to put triple-slash directive (#20009)
Some people might not know what "entrypoint" means or where to put the
triple-slash directive.
Diffstat (limited to 'cli/tsc')
-rw-r--r-- | cli/tsc/99_main_compiler.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cli/tsc/99_main_compiler.js b/cli/tsc/99_main_compiler.js index 2190dda99..43a3c3bcf 100644 --- a/cli/tsc/99_main_compiler.js +++ b/cli/tsc/99_main_compiler.js @@ -58,7 +58,8 @@ delete Object.prototype.__proto__; ]); const unstableMsgSuggestion = "If not, try changing the 'lib' compiler option to include 'deno.unstable' " + - 'or add a triple-slash directive to your entrypoint: /// <reference lib="deno.unstable" />'; + "or add a triple-slash directive to the top of your entrypoint (main file): " + + '/// <reference lib="deno.unstable" />'; /** * @param {unknown} value @@ -344,7 +345,8 @@ delete Object.prototype.__proto__; if (msg === "Cannot find name 'Deno'.") { msg += " Do you need to change your target library? " + "Try changing the 'lib' compiler option to include 'deno.ns' " + - 'or add a triple-slash directive to your entrypoint: /// <reference lib="deno.ns" />'; + "or add a triple-slash directive to the top of your entrypoint " + + '(main file): /// <reference lib="deno.ns" />'; } return msg; } |