You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.154.0/containers/javascript-node/.devcontainer/base.Dockerfile
2
+
3
+
# [Choice] Node.js version: 14, 12, 10
4
+
ARG VARIANT="14-buster"
5
+
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}
Copy file name to clipboardExpand all lines: .github/ISSUE_TEMPLATE/Bug_report.md
+49-18Lines changed: 49 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,38 +7,69 @@ assignees: ''
7
7
8
8
---
9
9
10
-
<!-- 🚨 STOP 🚨 STOP 🚨 STOP 🚨
10
+
# Bug Report
11
11
12
-
Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section!
12
+
<!--
13
+
Please fill in each section completely. Thank you!
14
+
-->
13
15
14
-
Please help us by doing the following steps before logging an issue:
* Read the FAQ, especially the "Common Feature Requests" section: https://github.com/Microsoft/TypeScript/wiki/FAQ
10
+
# Suggestion
17
11
12
+
<!--
13
+
Please fill in each section completely. Thank you!
18
14
-->
19
15
20
-
## Search Terms
16
+
## 🔍 Search Terms
21
17
22
-
<!-- List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily -->
18
+
<!--
19
+
💡 Did you know? TypeScript has over 2,000 open suggestions!
20
+
🔎 Please search thoroughly before logging new feature requests as most common ideas already have a proposal in progress.
21
+
The "Common Feature Requests" section of the FAQ lists many popular requests: https://github.com/Microsoft/TypeScript/wiki/FAQ#common-feature-requests
23
22
24
-
## Suggestion
23
+
Replace the text below:
24
+
-->
25
25
26
-
<!-- A summary of what you'd like to see added or changed -->
26
+
List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily and help provide feedback.
27
27
28
-
## Use Cases
28
+
## ✅ Viability Checklist
29
29
30
30
<!--
31
-
What do you want to use this for?
32
-
What shortcomings exist with current approaches?
31
+
Suggestions that don't meet all these criteria are very, very unlikely to be accepted.
32
+
We always recommend reviewing the TypeScript design goals before investing time writing
33
+
a proposal for ideas outside the scope of the project.
33
34
-->
34
-
35
-
## Examples
36
-
37
-
<!-- Show how this would be used and what the behavior would be -->
38
-
39
-
## Checklist
40
-
41
35
My suggestion meets these guidelines:
42
36
43
37
*[ ] This wouldn't be a breaking change in existing TypeScript/JavaScript code
44
38
*[ ] This wouldn't change the runtime behavior of existing JavaScript code
45
39
*[ ] This could be implemented without emitting different JS based on the types of the expressions
46
-
*[ ] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
40
+
*[ ] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
47
41
*[ ] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).
42
+
43
+
44
+
## ⭐ Suggestion
45
+
46
+
<!-- A summary of what you'd like to see added or changed -->
47
+
48
+
## 📃 Motivating Example
49
+
50
+
<!--
51
+
If you were announcing this feature in a blog post, what's a short explanation that shows
52
+
a developer why this feature improves the language?
This is intentional since the value of `obj.name` "could" change types between when the narrowing occurred and when the callback was invoke. See also #11498
23
+
24
+
The second is that *function calls do not reset narrowings*. In other words:
25
+
```ts
26
+
function fn(obj: { name:string|number }) {
27
+
if (typeofobj.name==="string") {
28
+
console.log("Here");
29
+
// Does not error
30
+
console.log(obj.name.toLowerCase());
31
+
}
32
+
}
33
+
```
34
+
This is intentional behavior, *even though `console.log` could have mutated obj*. This rule is consistently applied, even with the function is in-principle inspectable to actually have side effects
0 commit comments