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
This technically isn't a JavaScript-specific problem, since any language that contains IEEE-754 floats has the same behavior;
282
-
but JavaScript's primary numeric type is a floating point number, and number parsing in JavaScript can often result in `NaN`.
283
-
In turn, checking against `NaN`ends up being fairly common, and the correct way to do so is to use [`Number.isNaN`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN) - *but* as we mentioned, lots of people accidentally end up checking with `someValue === NaN` instead.
281
+
IEEE-754 float를 포함하는 모든 언어가 동일하게 동작하므로, 기술적으로 JavaScript만의 문제는 아닙니다.
282
+
JavaScript의 기본 숫자 타입은 부동소수점 숫자이며, JavaScript는 숫자 구문을 종종 `NaN`으로 분석할 수 있습니다.
283
+
그러므로 `NaN`값 확인은 일반적이며, [`Number.isNaN`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN)를 사용하면 올바르게 확인할 수 있습니다. 하지만 위에서 언급했듯이 많은 사람들이 실수로 `someValue === NaN`을 사용해서 확인하게 됩니다.
284
284
285
-
TypeScript now errors on direct comparisons against `NaN`, and will suggest using some variation of `Number.isNaN`instead.
285
+
TypeScript는 이제 `NaN` 값을 직접 비교하면 오류를 보여주고 `Number.isNaN`사용을 제안합니다.
286
286
287
287
```ts
288
288
function validate(someValue:number) {
@@ -293,9 +293,9 @@ function validate(someValue: number) {
293
293
}
294
294
```
295
295
296
-
We believe that this change should strictly help catch beginner errors, similar to how TypeScript currently issues errors on comparisons against object and array literals.
296
+
이번 변경은 TypeScript가 현재 객체 및 배열 리터럴에 대한 비교에서 오류를 발생시키는 방식과 유사하게, 초보자 오류를 잡는 데 큰 도움이 될 것이라고 믿습니다.
297
297
298
-
We'd like to extend our thanks to [Oleksandr Tarasiuk](https://github.com/a-tarasyuk) who [contributed this check](https://github.com/microsoft/TypeScript/pull/50626).
298
+
[이 기능에 기여한](https://github.com/microsoft/TypeScript/pull/50626)[Oleksandr Tarasiuk](https://github.com/a-tarasyuk)에게 감사를 전하고 싶습니다.
299
299
300
300
## 파일 시스템 이벤트를 사용한 파일 감시
301
301
@@ -498,4 +498,4 @@ For more information, [see this pull request](https://github.com/microsoft/TypeS
498
498
499
499
As part of an optimization on substitution types, `SubstitutionType` objects no longer contain the `substitute` property representing the effective substitution (usually an intersection of the base type and the implicit constraint) - instead, they just contain the `constraint` property.
500
500
501
-
For more details, [read more on the original pull request](https://github.com/microsoft/TypeScript/pull/50397).
501
+
For more details, [read more on the original pull request](https://github.com/microsoft/TypeScript/pull/50397).
0 commit comments