genType
genType copied to clipboard
Does not generate accessors
Given the snippet
@deriving(accessors)
@genType
type rec t = {
id: string,
name: string,
description: string,
related: array<t>,
updated: option<string>,
}
I'd assume that genType would create both interface for t
and type defs for accessors functions, but it generates only
/* TypeScript file generated from Interest.res by genType. */
/* eslint-disable import/first */
// tslint:disable-next-line:interface-over-type-literal
export type t = {
readonly id: string;
readonly name: string;
readonly description: string;
readonly related: t[];
readonly updated?: string
};
This could be misleading while creating and sharing a library, or even while handling interop between Rescript and TypeScript in a single codebase
genType does not have any special support for @deriving(accessors)
This repository is being archived. If you feel like the issue still relevant, please re-create it in the compiler repo. Thanks!