bigskysoftware / bigskysoftware/_hyperscript
Feature Request: Default values for parameters of events and functions
- 主要言語
- JavaScript
- スター
- 3.8k
- フォーク
- 172
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Easier to show rather explain:
```js
on reset(count = #words.children.length)
```
```js
def nextWord(value = '')
```
If the event property wasn't set, then allow an expression to be evaluated for the default value of that property. Similarly, if an argument wasn't passed in, allow an expression to be evaluated for the default value of that argument to a function. I'm suggesting the `=` syntax, but other words may make sense as well (such as `default`). Note that this may be complicated once multiple arguments are concerned, such as
```js
def nextWord(value = '', value2, value3 = 5)
```
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
まず、`on` イベントと `def` 関数の例に対応するパーサーと評価器のエントリポイントを見つけます。この issue ではファイルやテストは指定されていません。実装では、省略されたイベントプロパティと関数引数に対する式によるデフォルト値を、複数引数のケースも含めてサポートし、示されている例をカバーする必要があります。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript
- 領域
- compilers
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100