Section(title: Results) |
Section(title: "Results"): 인수의 텍스트는 따옴표로 감싸고, 따옴표 없는 단어는 이름입니다 |
fix (KS6009) |
Button(on_click: "count += 1") |
Button(on_click: $count += 1) 또는 on_click: { $count += 1 }: 큰따옴표는 항상 텍스트를 만듭니다 |
|
'Hello $name' |
"Hello { $name }": 큰따옴표 안의 중괄호는 식을 평가합니다. 작은따옴표는 텍스트를 그대로 유지합니다 |
|
$route = "/users/{id}", "\d{3}", "a { color: red }" |
'/users/{id}', '\d{3}', 'a { color: red }', 또는 중괄호 두 번("/users/{{id}}"): 큰따옴표 안의 { }는 무엇으로 시작하든 항상 식을 담으므로, "{ User->count() } users"와 "{ 1 + 2 }"가 값으로 채워집니다 |
|
total = 3, total += 1, const tax = 0.2 |
$total = 3, $total += 1, const $tax = 0.2: 변수는 설정되는 곳에도 $를 가집니다 |
fix (KS6010) |
fn($n) => $n * 2 |
fn(n) => $n * 2 |
fix (KS6010) |
numbered: no, new_page: yes |
numbered: false, new_page: true (또는 플래그만: new_page) |
fix (KS6011) |
spawn(fn: job), tools: lookup |
spawn(fn: @job), tools: [@lookup]: 함수는 @name와 같이 이름 붙입니다 |
fix (KS6012) |
files: "settings, .env" |
files: ['settings', '.env']: 리스트는 배열입니다 |
fix (KS6006) |
timeout: 30, ttl: '10m' |
timeout: 30s, ttl: 10m: 시간 길이는 단위를 붙이고 따옴표는 쓰지 않습니다 |
fix (KS6018) |