Skip to content

Commit

Permalink
Fix: support result in GenType.
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianoc committed Nov 1, 2023
1 parent 3e93173 commit a06c20c
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 16 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
# 11.0.0-rc.6 (Unreleased)

#### :bug: Bug Fix
- Fix issue with GenType and `result` introduced in rc.5. https://github.com/rescript-lang/rescript-compiler/pull/6464

# 11.0.0-rc.5

#### :rocket: New Feature
Expand Down
2 changes: 1 addition & 1 deletion jscomp/gentype/TranslateTypeExprFromTypes.ml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ let translateConstr ~config ~paramsTranslation ~(path : Path.t) ~typeEnv =
};
] );
}
| ( (["Pervasives"; "result"] | ["Belt"; "Result"; "t"]),
| ( (["Pervasives"; "result"] | ["Belt"; "Result"; "t"] | ["result"]),
[paramTranslation1; paramTranslation2] ) ->
let case n name type_ =
{case = {label = string_of_int n; labelJS = StringLabel name}; t = type_}
Expand Down
35 changes: 22 additions & 13 deletions jscomp/gentype_tests/typescript-react-example/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a06c20c

Please sign in to comment.