z-pattern-matching/z

does not work with typescript

Open

#35 opened on 2017年12月1日

GitHub で見る
 (3 comments) (0 reactions) (0 assignees)JavaScript (1,714 stars) (78 forks)batch import
bughelp wanted

説明

Strange but when I use some of the snippets with typescript, it always returns the result of the first param. For example

import {matches} from 'z';

const person = { name: 'Maria' }
matches(person)(
  (x = { name: 'John' }) => console.log('John you are not welcome!'),
  (x)                    => console.log(`Hey ${x.name}, you are welcome!`)
)

returns John you are not welcome.

コントリビューターガイド

does not work with typescript · z-pattern-matching/z#35 | Good First Issue