Closed OctoD closed 12 months ago
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
t
/* 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)
@deriving(accessors)
This repository is being archived. If you feel like the issue still relevant, please re-create it in the compiler repo. Thanks!
Given the snippet
I'd assume that genType would create both interface for
t
and type defs for accessors functions, but it generates onlyThis could be misleading while creating and sharing a library, or even while handling interop between Rescript and TypeScript in a single codebase