Skip to content

Commit

Permalink
fixed #22
Browse files Browse the repository at this point in the history
  • Loading branch information
HairyRabbit committed Jan 4, 2018
1 parent e32bbe4 commit e20b3ca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion js2-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -12187,7 +12187,7 @@ When `js2-is-in-destructuring' is t, forms like {a, b, c} will be permitted."
;; parse type params for class method prop
;; TODO(rabbit): object method also has this feature
(when (= (js2-peek-token) js2-LT)
(setq type-params (js2-parse-type-params)))
(setq type-params (js2-parse-type-params t)))
(cond
;; method definition: {f() {...}}
((and (= (js2-peek-token) js2-LP)
Expand Down
5 changes: 5 additions & 0 deletions tests/flow.el
Original file line number Diff line number Diff line change
Expand Up @@ -853,6 +853,11 @@ the test."
b<c>(d: e): f {}
}")

(js2-deftest-parse class-method-type-with-named-type-params
"class a {
b<c: d>(e: f): g {}
}")

(js2-deftest-parse class-method-type-getset
"class a {
get a(b: c): d {}
Expand Down

0 comments on commit e20b3ca

Please sign in to comment.