You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.
The docs say that if .rei files exist it will take the annotations from there. However I've tried annotating in the interface and in the implementation and no combination could get it to output. The workaround I am using is to define another module and include it in the module that I manually type with an interface.
module Test_Types = {
/** I put shared types/functions here, but I can't use private types */
[@genType]
type t = string;
[@genType]
let make = t => t ++ "...";
};
module Test: {
include (module type of Test_Types);
} = {
include Test_Types;
};
Is this a bug or is there some other syntax for getting this to work?
The text was updated successfully, but these errors were encountered:
chrischen
changed the title
Cannot annotate and export from manually typed submodule
Cannot annotate/export functions from manually typed submodule
Oct 27, 2020
If manually specifying the interface for module, the @genType annotation does not work on functions, but works on types.
Generates
But the Test_make function is not generated.
If I get rid of the type interface:
Then both types are generated.
The docs say that if .rei files exist it will take the annotations from there. However I've tried annotating in the interface and in the implementation and no combination could get it to output. The workaround I am using is to define another module and include it in the module that I manually type with an interface.
Is this a bug or is there some other syntax for getting this to work?
The text was updated successfully, but these errors were encountered: