Tslint: λΉ„ λΆ€μšΈ μ»¨ν…μŠ€νŠΈμ—μ„œ μ‚¬μš©λ˜λŠ” 논리 μ—°μ‚°μžμ— λŒ€ν•΄ strict-boolean-expressionsκ°€ μ‹€ν–‰λ˜μ§€ μ•Šμ•„μ•Ό ν•©λ‹ˆλ‹€.

에 λ§Œλ“  2017λ…„ 10μ›” 04일  Β·  18μ½”λ©˜νŠΈ  Β·  좜처: palantir/tslint

버그 μ‹ κ³ 

  • __TSLint 버전__: 5.7
  • __TypeScript 버전__: 2.5.3
  • ____λ₯Ό 톡해 TSLint μ‹€ν–‰ν•˜κΈ°: CLI

λ¦°νŠΈλ˜λŠ” TypeScript μ½”λ“œ

// code snippet
function valueOrDefault(a?: string) {
  return a || "the default";
}

tslint.json ꡬ성:

{
  "defaultSeverity": "error",
  "extends": [
      "tslint:all"
  ]
}

μ‹€μ œ 행동

2개의 였λ₯˜μ— λŒ€ν•œ 보고 λ°›κΈ°:
strict-boolean-expressions This type is not allowed in the operand for the '||' operator because it could be undefined. Only booleans are allowed.
strict-boolean-expressions This type is not allowed in the operand for the '||' operator because it is always truthy. Only booleans are allowed.

μ˜ˆμƒλ˜λŠ” 행동

보고된 였λ₯˜κ°€ μ—†μŠ΅λ‹ˆλ‹€. λ§€κ°œλ³€μˆ˜μ˜ 기본값을 μ œκ³΅ν•˜κΈ° μœ„ν•΄ 논리적인 || μ—°μ‚°μžλ₯Ό μ‚¬μš©ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€. 어디에도 boolean κ°€ μ—†μŠ΅λ‹ˆλ‹€. ν‘œν˜„μ‹μ˜ μž…λ ₯μ΄λ‚˜ 좜λ ₯이 μ•„λ‹™λ‹ˆλ‹€.

Fixed Bug

κ°€μž₯ μœ μš©ν•œ λŒ“κΈ€

제 μƒκ°μ—λŠ” strict-boolean-expressions λŠ” && 및 || 의 μ™Όμͺ½ ν”Όμ—°μ‚°μžλ§Œ 확인해야 ν•©λ‹ˆλ‹€. μ΄λŸ¬ν•œ μ—°μ‚°μžλŠ” (본질적으둜) 삼항에 λŒ€ν•œ μ„€νƒ•μž…λ‹ˆλ‹€. a && b λŠ” a ? b : a 와 κ°™κ³  a || b λŠ” a ? a : b . μ΄λŸ¬ν•œ μš©μ–΄λ‘œ 생각할 λ•Œ RHSλ₯Ό λ¬΄μ‹œν•˜λŠ” 것은 λ§Žμ€ μ˜λ―Έκ°€ 있으며 단락 μ—°μ‚°μžμ˜ λ™μž‘μ€ μ‚Όν•­μ˜ λ™μž‘κ³Ό μΌμΉ˜ν•˜κ²Œ λ©λ‹ˆλ‹€.

그런 λ‹€μŒ 전체가 if/for/while μ•ˆμ— 있으면 strict-boolean-conditions κ°€ μž‘λ™ν•˜μ—¬ 전체 ν‘œν˜„μ‹μ„ 확인할 수 μžˆμŠ΅λ‹ˆλ‹€. λ‚˜λŠ” 이것이 λͺ¨λ“  μœ μš©ν•œ 경우λ₯Ό λ‹€λ£° 것이라고 μƒκ°ν•˜κ³  이 κ·œμΉ™μ„ λ‹€μ‹œ μΌ€ 수 μžˆμ„ κ²ƒμž…λ‹ˆλ‹€.

이것을 문제둜 ν‘œμ‹œν•œ μ½”λ“œλŠ” λ‹€μŒκ³Ό 같이 λ¬Έμ„œν™”λœ 일반적인 React νŒ¨ν„΄ μ΄μ—ˆμŠ΅λ‹ˆλ‹€.

function Foo(props: { showToggle: boolean }) {
  return <div>{props.showToggle && <Toggle />}</div>;
}
ERROR: 2:36 strict-boolean-expressions This type is not allowed in the operand for the '&&' operator because it is always truthy. Allowed types are boolean, null-union, undefined-union, string, or number.

@ajafff μƒμˆ˜ RHS둜 인해 λͺ¨λ“  κ·œμΉ™ μ˜΅μ…˜μ΄ ν™œμ„±ν™”λœ κ²½μš°μ—λ„ 그의 μ½”λ“œλŠ” λ¦°ν„°λ₯Ό μ „λ‹¬ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.

export function valueOrDefault(a?: string) {
  return a || "the default";
}
"strict-boolean-expressions": [true, "allow-null-union", "allow-undefined-union", "allow-string", "allow-number", "allow-mix"]
ERROR: 2:15 strict-boolean-expressions This type is not allowed in the operand for the '||' operator because it is always truthy. Allowed types are boolean, null-union, undefined-union, string, or number.

ν‘œν˜„μ˜ μ˜λ„λŠ” LHS에 λŒ€ν•œ μ‘°κ±΄λΆ€μ΄λ―€λ‘œ RHSλ₯Ό λ¬΄μ‹œν•˜μžλŠ” λ‚΄ μ œμ•ˆμ€ 그의 λ¬Έμ œλ„ ν•΄κ²°ν•  κ²ƒμž…λ‹ˆλ‹€.

λͺ¨λ“  18 λŒ“κΈ€

생각? 기도? μ‹œμž‘ μœ„μΉ˜/방법에 λŒ€ν•œ μ œμ•ˆμ€ λ¬΄μ—‡μž…λ‹ˆκΉŒ?

@marcind κ·œμΉ™μ„ λ°”κΎΈλŠ” 것과 μ–΄λ–»κ²Œ λ‹€λ₯΄κ²Œ λ™μž‘ν•΄μ•Ό ν•˜λŠ”μ§€μ— λŒ€ν•œ 예λ₯Ό μ œκ³΅ν•  수 μžˆμŠ΅λ‹ˆκΉŒ?

μ£„μ†‘ν•©λ‹ˆλ‹€. 처음 μ œμΆœν•œ λΆ€λΆ„ 쀑 μ–΄λŠ 뢀뢄이 λΆˆλΆ„λͺ…ν•©λ‹ˆκΉŒ?

λ‚΄ μš”μ μ€ 이 κ·œμΉ™μ΄ "λΆ€μšΈ μ»¨ν…μŠ€νŠΈ"μ—μ„œλ§Œ μ‹€ν–‰λ˜μ–΄μ•Ό ν•œλ‹€λŠ” κ²ƒμž…λ‹ˆλ‹€. 두 가지 경우λ₯Ό 생각할 수 μžˆμŠ΅λ‹ˆλ‹€.

  1. if , while λ˜λŠ” for
  2. boolean μœ ν˜•μ˜ λ³€μˆ˜μ— ν• λ‹Ήλ©λ‹ˆλ‹€.

κΈ°λ³Έκ°’ λ˜λŠ” 단락 평가λ₯Ό μ œκ³΅ν•˜λ €κ³  ν•  λ•Œ κ·œμΉ™μ΄ μ‹€ν–‰λ˜μ§€ μ•Šμ•„μ•Ό ν•©λ‹ˆλ‹€.

  1. const a: string = potentiallyUndefinedString || "the default";
  2. const a: string | undefined = potentiallyUndefinedObject && potentiallyUndefinedObject.getString()

"allow-undefined-union" μ˜΅μ…˜μ„ μ‚¬μš©ν•˜λ©΄ λ§ˆμ§€λ§‰ κ²Œμ‹œλ¬Όμ˜ @marcind μ˜ˆμ œκ°€ μž‘λ™ν•©λ‹ˆλ‹€.

μš”μ²­μ˜ λ‹€λ₯Έ 뢀뢄은 if , for , while , do ... while 및 μ‘°κ±΄λΆ€λ§Œ ν™•μΈν•˜λŠ” strict-boolean-conditions λΌλŠ” λ³„λ„μ˜ κ·œμΉ™μ΄μ–΄μ•Ό ν•©λ‹ˆλ‹€. ν‘œν˜„μ‹( x ? y : z ).
λ‚˜λŠ” 그것이 ꡬ성 μš”μ†Œκ°€ μ•„λ‹Œ 전체 쑰건의 μœ ν˜• 만 ν™•μΈν•œλ‹€κ³  상상할 수 μžˆμŠ΅λ‹ˆλ‹€.

function foo(a: boolean, b?: boolean) {
    if (b || a) {} // passes, result is always boolean
    if (b && a) {} // fails, result is boolean | undefined
    if (a || b) {} // fails, result is boolean | undefined
    if (a || !!b) {} // passes
}

μ•„λ§ˆλ„ 이것은 μƒˆ κ·œμΉ™ λŒ€μ‹  κΈ°μ‘΄ κ·œμΉ™μ— λŒ€ν•œ μ˜΅μ…˜μΌ 수 μžˆμŠ΅λ‹ˆλ‹€.

제 μƒκ°μ—λŠ” strict-boolean-expressions λŠ” && 및 || 의 μ™Όμͺ½ ν”Όμ—°μ‚°μžλ§Œ 확인해야 ν•©λ‹ˆλ‹€. μ΄λŸ¬ν•œ μ—°μ‚°μžλŠ” (본질적으둜) 삼항에 λŒ€ν•œ μ„€νƒ•μž…λ‹ˆλ‹€. a && b λŠ” a ? b : a 와 κ°™κ³  a || b λŠ” a ? a : b . μ΄λŸ¬ν•œ μš©μ–΄λ‘œ 생각할 λ•Œ RHSλ₯Ό λ¬΄μ‹œν•˜λŠ” 것은 λ§Žμ€ μ˜λ―Έκ°€ 있으며 단락 μ—°μ‚°μžμ˜ λ™μž‘μ€ μ‚Όν•­μ˜ λ™μž‘κ³Ό μΌμΉ˜ν•˜κ²Œ λ©λ‹ˆλ‹€.

그런 λ‹€μŒ 전체가 if/for/while μ•ˆμ— 있으면 strict-boolean-conditions κ°€ μž‘λ™ν•˜μ—¬ 전체 ν‘œν˜„μ‹μ„ 확인할 수 μžˆμŠ΅λ‹ˆλ‹€. λ‚˜λŠ” 이것이 λͺ¨λ“  μœ μš©ν•œ 경우λ₯Ό λ‹€λ£° 것이라고 μƒκ°ν•˜κ³  이 κ·œμΉ™μ„ λ‹€μ‹œ μΌ€ 수 μžˆμ„ κ²ƒμž…λ‹ˆλ‹€.

이것을 문제둜 ν‘œμ‹œν•œ μ½”λ“œλŠ” λ‹€μŒκ³Ό 같이 λ¬Έμ„œν™”λœ 일반적인 React νŒ¨ν„΄ μ΄μ—ˆμŠ΅λ‹ˆλ‹€.

function Foo(props: { showToggle: boolean }) {
  return <div>{props.showToggle && <Toggle />}</div>;
}
ERROR: 2:36 strict-boolean-expressions This type is not allowed in the operand for the '&&' operator because it is always truthy. Allowed types are boolean, null-union, undefined-union, string, or number.

@ajafff μƒμˆ˜ RHS둜 인해 λͺ¨λ“  κ·œμΉ™ μ˜΅μ…˜μ΄ ν™œμ„±ν™”λœ κ²½μš°μ—λ„ 그의 μ½”λ“œλŠ” λ¦°ν„°λ₯Ό μ „λ‹¬ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.

export function valueOrDefault(a?: string) {
  return a || "the default";
}
"strict-boolean-expressions": [true, "allow-null-union", "allow-undefined-union", "allow-string", "allow-number", "allow-mix"]
ERROR: 2:15 strict-boolean-expressions This type is not allowed in the operand for the '||' operator because it is always truthy. Allowed types are boolean, null-union, undefined-union, string, or number.

ν‘œν˜„μ˜ μ˜λ„λŠ” LHS에 λŒ€ν•œ μ‘°κ±΄λΆ€μ΄λ―€λ‘œ RHSλ₯Ό λ¬΄μ‹œν•˜μžλŠ” λ‚΄ μ œμ•ˆμ€ 그의 λ¬Έμ œλ„ ν•΄κ²°ν•  κ²ƒμž…λ‹ˆλ‹€.

&& 및 || 의 RHSλ₯Ό ν™•μΈν•˜λŠ” 것이 λ²„κ·ΈλΌλŠ” 데 λ™μ˜ν•©λ‹ˆλ‹€.


λ‚˜λŠ” λ˜ν•œ && , || 의 LHS 및 ! 의 ν”Όμ—°μ‚°μžμ— λŒ€ν•œ 검사λ₯Ό μ™„ν™”ν•˜λŠ” κ²½ν–₯이 μžˆμŠ΅λ‹ˆλ‹€. ν‘œν˜„μ‹μ΄ 항상 참인지 항상 κ±°μ§“μΈμ§€λ§Œ 확인해야 ν•©λ‹ˆλ‹€.
그러면 if , for , while , do ... while 쑰건 및 λΆ€μšΈ(λ˜λŠ” 기타 κ΅¬μ„±λœ λͺ¨λ“  ν•­λͺ©λ§Œ ν—ˆμš©ν•˜λŠ” μ—„κ²©ν•œ 검사λ₯Ό μœ„ν•œ 쑰건식)만 λ‚¨μŠ΅λ‹ˆλ‹€. ). @adidahia 생각?

ν˜„μž¬ μ‚¬μš© κ°€λŠ₯ν•œ ꡬ성 μ˜΅μ…˜μœΌλ‘œ 이 κ·œμΉ™μ„ ν™œμ„±ν™”ν•˜λ €λ©΄ μ½”λ“œ κΈ°λ°˜μ„ μ‚¬μš©ν•˜λŠ” 데 며칠이 μ†Œμš”λ©λ‹ˆλ‹€. :(

number , null λ˜λŠ” undefined κ°€ boolean 둜의 μ•”μ‹œμ  λ³€ν™˜μ„ λ°©μ§€ν•˜κΈ°λ₯Ό ν¬λ§ν•˜μ—¬ ν™œμ„±ν™”ν–ˆμŠ΅λ‹ˆλ‹€. 예λ₯Ό λ“€μ–΄:

if (!!array.length) { /* ... */ }


md5-d563d6246c0e981c16f8a2b3d7f53974





md5-430ec08bab82330fa4e519419e9ad014




However I find the following uses acceptable:



md5-70351fc6fdb328ee060919d6974e2cf4



```tsx


md5-036fd2ddd516eac8e1379cdcb9ac2b9a


λ‚˜λŠ” 이것이 @marcindκ°€ μ œμ•ˆν•œ 것과 μΌμΉ˜ν•œλ‹€κ³  생각

λ‚˜λŠ” λ˜ν•œ &&의 LHS에 λŒ€ν•œ 검사λ₯Ό μ™„ν™”ν•˜λŠ” κ²½ν–₯이 μžˆμŠ΅λ‹ˆλ‹€. || 그리고 ! 의

@ajafff μ΄λ ‡κ²Œ ν•˜λ©΄ if (!!array.length) λ˜λŠ” if (!possiblyNull) ν•©λ²•ν™”λ©λ‹ˆκΉŒ?

@ajafff @adidahiya μΆ”κ°€ 생각이 μžˆμœΌμ‹ κ°€μš”? @rhys-vdw와 λ˜‘κ°™μ€ μƒν™©μž…λ‹ˆλ‹€.

λ‚΄ μžμ‹ μ˜ ν”„λ‘œμ νŠΈλ₯Ό λ»”λ»”ν•˜κ²Œ κ΄‘κ³ :
이번 호의 λ§ˆμ§€λ§‰ ν™œλ™ μ΄ν›„λ‘œ μ €λŠ” Fimbullinter ν”„λ‘œμ νŠΈμΈ μ €λ§Œμ˜ λ¦°ν„°λ₯Ό λ§Œλ“€μ—ˆμŠ΅λ‹ˆλ‹€. λΉ λ₯Έ μ‹œμž‘μ„ μœ„ν•œ λ¬Έμ„œ 읽기: https://github.com/fimbullinter/wotan/blob/master/packages/wotan/README.md

μ—¬κΈ°μ—λŠ” no-useless-predicate κ·œμΉ™μ΄ ν¬ν•¨λ˜μ–΄ 있으며 μ΄λŠ” μ°Ύκ³  μžˆλŠ” 것일 수 μžˆμŠ΅λ‹ˆλ‹€. TSLint의 strict-type-predicates 와 strict-boolean-expressions 의 μ‘°ν•©μ΄μ§€λ§Œ λͺ‡ 가지 μ£Όμš” 차이점이 μžˆμŠ΅λ‹ˆλ‹€.

TSLint의 strict-type-predicates 와 달리 --strictNullChecks 없이도 μž‘λ™ν•˜λ©° μœ ν˜• λ§€κ°œλ³€μˆ˜μ™€ 빈 객체 μœ ν˜•μ„ μ˜¬λ°”λ₯΄κ²Œ μ²˜λ¦¬ν•©λ‹ˆλ‹€. (μ•„λ§ˆλ„ 이 ν˜Έμ— κ°€μž…ν•œ μ‚¬λžŒλ“€μ—κ²ŒλŠ” 그닀지 ν₯미둭지 μ•Šμ„ κ²ƒμž…λ‹ˆλ‹€)
TSLint의 strict-boolean-expressions 의 μ£Όμš” 차이점은 λͺ¨λ“  것이 λΆ€μšΈμΌ ν•„μš”κ°€ μ—†λ‹€λŠ” κ²ƒμž…λ‹ˆλ‹€(μ•”μ‹œμ  κ°•μ œ λ³€ν™˜μ„ κ°μ§€ν•˜μ§€ μ•ŠμŒ). λͺ¨λ“  쑰건이 μ°Έκ³Ό 거짓이 될 수 μžˆμ–΄μ•Ό ν•©λ‹ˆλ‹€.

λͺ‡ 가지 예:

if (0) {} // error, always falsy
if (1) {} // error, always truthy
declare let array: string[];
if (array.length) {} // no error
if (!array.length) {} // no error
if (!!array.length) {} // no error
if (array.length === undefined) {} // error, condition is always false
if (!!false) {} // 2 errors, because of the double negation of an always falsy value

declare let someString: string;
return someString || 'some default string'; // no error, because 'someString' might be falsy

declare const foo: 'bar' | 'baz';
return foo || 'bas'; // error, 'foo' is always truthy

declare let optionalFunction: (() => void) | undefined;
optionalFunction && optionalFunction(); // no error

λ‚΄ μ‹€μ œ μ½”λ“œμ—μ„œ λ‹€μŒ μ‚¬μš© μ‚¬λ‘€λ‘œ μ°¨μž„ν•˜κ³  μ‹ΆμŠ΅λ‹ˆλ‹€.

export interface ILoggingRule {
    readonly isFinal?: boolean;
    readonly loggerNamePattern?: string;
    readonly maxLogLevel?: LogLevel;
    readonly minLogLevel?: LogLevel;
    readonly target: Target;
}

// ...

/**
 * Creates an instance of LoggingRule.
 * <strong i="6">@param</strong> options Configuration options of the logging rule.
 */
public constructor(options: ILoggingRule) {
    // tslint:disable:strict-boolean-expressions
    this.isFinal = options.isFinal || false;
    this.loggerNamePattern = options.loggerNamePattern || "*";
    this.maxLogLevel = options.maxLogLevel || LogLevel.Fatal;
    this.minLogLevel = options.minLogLevel || LogLevel.Trace;
    this.target = options.target;
    // tslint:enable:strict-boolean-expressions
}

λ³΄μ‹œλ‹€μ‹œν”Ό LHSκ°€ μ •μ˜λ˜μ§€ μ•Šμ€ 경우 기본값을 λ‚˜νƒ€λ‚΄κΈ° μœ„ν•΄ || λ₯Ό μ‚¬μš©ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€. tslint 이 strict-boolean-expressions μ€€μˆ˜ν•œλ‹€λŠ” 것을 μ΄ν•΄ν•˜λ„λ‘ ν•˜λŠ” κ°„κ²°ν•œ 방법이 μžˆμŠ΅λ‹ˆκΉŒ? 그렇지 μ•ŠμœΌλ©΄ λΉ„ν™œμ„±ν™”/ν™œμ„±ν™” λͺ…령을 μ‚¬μš©ν•΄μ•Ό ν•©λ‹ˆλ‹€. (λ†€λžκ²Œλ„ 이것은 VSCodeκ°€ μ•„λ‹Œ μœ ν˜• 검사가 ν™œμ„±ν™”λœ κ²½μš°μ—λ§Œ λ°œμƒν•˜λŠ” λ¬Έμ œμž…λ‹ˆλ‹€.)

이 μ‚¬μš©λ²•μ€ ν‘œμ€€μ΄λ©° JavaScriptμ—μ„œ 맀우 일반적이며 νŽΈλ¦¬ν•˜λ©° 이 κ·œμΉ™μ΄ μ‹€νŒ¨ν•˜λ„λ‘ νŠΈλ¦¬κ±°ν•΄μ„œλŠ” μ•ˆ λ©λ‹ˆλ‹€.

IMHO && 및 || 의 RHSλŠ” ν™•μΈν•˜μ§€ μ•Šμ•„μ•Ό 합선을 ν—ˆμš©ν•©λ‹ˆλ‹€. 이것은 κΈ°λ³Έ λ™μž‘μ΄μ–΄μ•Ό ν•©λ‹ˆλ‹€(λ˜λŠ” 적어도 allow-any-rhs 와 같은 μ˜΅μ…˜μ΄ μžˆμ–΄μ•Ό 함). ν˜„μž¬ μ½”λ“œ κΈ°λ°˜μ— λ§Žμ€ 단락이 있기 λ•Œλ¬Έμ— strict-boolean-expressions μ‚¬μš©ν•  수 μ—†μŠ΅λ‹ˆλ‹€.

string λ˜λŠ” number λ₯Ό LHS둜 μ‚¬μš©ν•˜λŠ” 것은 μœ„ν—˜ν•  수 μžˆμœΌλ―€λ‘œ LHSλ₯Ό κ·ΈλŒ€λ‘œ IMHO둜 확인해야 ν•©λ‹ˆλ‹€. λ‹€μŒ 예λ₯Ό μ°Έμ‘°ν•˜μ„Έμš”.

function foo(x: string | number | null) {
  return x || defaultValue;
}

μ΄λŠ” λ§Žμ€ κ°œλ°œμžκ°€ null 뿐만 μ•„λ‹ˆλΌ 0 및 "" 둜 인해 defaultValue κ°€ λ°˜ν™˜λœλ‹€λŠ” 것을 μ΄ν•΄ν•˜μ§€ λͺ»ν•˜κΈ° λ•Œλ¬Έμ— μœ„ν—˜ν•©λ‹ˆλ‹€.

κ°œλ°œμžκ°€ "" 및 0 도 κ±°μ§“μž„μ„ κ³ λ €ν•˜μ§€ μ•Šμ•˜κΈ° λ•Œλ¬Έμ— ν”„λ‘œμ νŠΈμ˜ μ£Όμš” 버그λ₯Ό μ²˜λ¦¬ν•΄μ•Ό ν–ˆμŠ΅λ‹ˆλ‹€. μ΄λŸ¬ν•œ μ’…λ₯˜μ˜ μ½”λ“œλ₯Ό λ°©μ§€ν•˜λŠ” 것이 strict-boolean-expressions μ£Όμš” μ‚¬μš© μ‚¬λ‘€μž…λ‹ˆλ‹€.

https://github.com/palantir/tslint/pull/4159 μ—μ„œ μˆ˜μ •λ˜μ—ˆμŠ΅λ‹ˆλ‹€. 곡동 μž‘μ—…μžμ˜ κ²€ν† κ°€ ν•„μš”ν•©λ‹ˆλ‹€.

μ£„μ†‘ν•©λ‹ˆλ‹€. 제 예 쀑 ν•˜λ‚˜κ°€ 잘λͺ»λ˜μ—ˆμŒμ„ λͺ…ν™•νžˆ ν•˜κ³  μ‹Άμ—ˆμŠ΅λ‹ˆλ‹€.

const x = possiblyUndefined || 5;

possiblyUndefined λŠ” 논리 였λ₯˜μΌ 수 μžˆλŠ” 0 일 수 있기 λ•Œλ¬Έμ— μž‘λ™ν•˜μ§€ μ•Šμ•„μ•Ό ν•©λ‹ˆλ‹€. @dobesv 의 PR이 μ—¬κΈ°μ—μ„œ μž‘λ™ν•˜λŠ” 것 κ°™μŠ΅λ‹ˆλ‹€.

배열에 λŒ€ν•œ 포함은 ES7 κΈ°λŠ₯μž…λ‹ˆλ‹€.
ES7 λ˜λŠ” ESNEXT πŸ¦„λ₯Ό μ‚¬μš©ν•˜λ €λ©΄ ꡬ성을 λ³€κ²½ν•΄μ•Ό ν•©λ‹ˆλ‹€.

πŸš€

@rimiti μ•ˆλ…•ν•˜μ„Έμš”, 무엇을 λ§μ”€ν•˜μ‹œλŠ”μ§€ λͺ¨λ₯΄κ² μŠ΅λ‹ˆλ‹€. μ˜¬λ°”λ₯Έ μŠ€λ ˆλ“œμ— ν•΄λ‹Ή λŒ“κΈ€μ„ κ²Œμ‹œν•˜μ…¨μŠ΅λ‹ˆκΉŒ?

@dobesv μ•„, μ£„μ†‘ν•©λ‹ˆλ‹€ ;)

#4159둜 μˆ˜μ •λ¨, λ‹€μŒ λ¦΄λ¦¬μŠ€μ—μ„œ μ‚¬μš© κ°€λŠ₯

이 νŽ˜μ΄μ§€κ°€ 도움이 λ˜μ—ˆλ‚˜μš”?
0 / 5 - 0 λ“±κΈ‰