{"action":"created","issue":{"url":"https://api.github.com/repos/BuckleScript/bucklescript/issues/3120","repository_url":"https://api.github.com/repos/BuckleScript/bucklescript","labels_url":"https://api.github.com/repos/BuckleScript/bucklescript/issues/3120/labels{/name}","comments_url":"https://api.github.com/repos/BuckleScript/bucklescript/issues/3120/comments","events_url":"https://api.github.com/repos/BuckleScript/bucklescript/issues/3120/events","html_url":"https://github.com/BuckleScript/bucklescript/issues/3120","id":374616007,"node_id":"MDU6SXNzdWUzNzQ2MTYwMDc=","number":3120,"title":"Js.String function returns undefined but there is no way to detect such condition ","user":{"login":"htzh","id":5956967,"node_id":"MDQ6VXNlcjU5NTY5Njc=","avatar_url":"https://avatars1.githubusercontent.com/u/5956967?v=4","gravatar_id":"","url":"https://api.github.com/users/htzh","html_url":"https://github.com/htzh","followers_url":"https://api.github.com/users/htzh/followers","following_url":"https://api.github.com/users/htzh/following{/other_user}","gists_url":"https://api.github.com/users/htzh/gists{/gist_id}","starred_url":"https://api.github.com/users/htzh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htzh/subscriptions","organizations_url":"https://api.github.com/users/htzh/orgs","repos_url":"https://api.github.com/users/htzh/repos","events_url":"https://api.github.com/users/htzh/events{/privacy}","received_events_url":"https://api.github.com/users/htzh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-27T07:15:18Z","updated_at":"2018-10-27T11:53:08Z","closed_at":null,"author_association":"NONE","body":"Js.String function can return undefined in array(string), but there does not seem a way to detect this condition. What I have in mind is Js.String.splitByRe. When the regex has a capture group with optional match (using *) that is unmatched the corresponding output position is undefined. This is the js behavior. However this is not captured by the type modelling of array(string). Seems like we need a Js.String.undefined constant so that it can be compiled to a js comparison correctly to detect this condition?\r\n"},"comment":{"url":"https://api.github.com/repos/BuckleScript/bucklescript/issues/comments/433613976","html_url":"https://github.com/BuckleScript/bucklescript/issues/3120#issuecomment-433613976","issue_url":"https://api.github.com/repos/BuckleScript/bucklescript/issues/3120","id":433613976,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMzYxMzk3Ng==","user":{"login":"bobzhang","id":747051,"node_id":"MDQ6VXNlcjc0NzA1MQ==","avatar_url":"https://avatars0.githubusercontent.com/u/747051?v=4","gravatar_id":"","url":"https://api.github.com/users/bobzhang","html_url":"https://github.com/bobzhang","followers_url":"https://api.github.com/users/bobzhang/followers","following_url":"https://api.github.com/users/bobzhang/following{/other_user}","gists_url":"https://api.github.com/users/bobzhang/gists{/gist_id}","starred_url":"https://api.github.com/users/bobzhang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobzhang/subscriptions","organizations_url":"https://api.github.com/users/bobzhang/orgs","repos_url":"https://api.github.com/users/bobzhang/repos","events_url":"https://api.github.com/users/bobzhang/events{/privacy}","received_events_url":"https://api.github.com/users/bobzhang/received_events","type":"User","site_admin":false},"created_at":"2018-10-27T11:53:08Z","updated_at":"2018-10-27T11:53:08Z","author_association":"MEMBER","body":"@htzh do you have a concrete example, it may be a bug of external"}}
{"actor":{"display_login":"bobzhang"}}