Skip to content

SCC & topological sorting fails for types contained in declare module #157

Closed
@Lupus

Description

@Lupus

I'm trying to generate bindings for stream.d.ts from @types/node and do not see sufficient amount of recursive modules in output both in default and in all modes for --rec-modules. Only top level modules seem to be recursed, but not the nested ones. Strongly connected components and topological sorting should be applied to each level in module hierarchy to govern the resulting order and bundling of modules, or I'm missing something?

Command that I'm using:

$ ./node_modules/@ocsigen/ts2ocaml/dist/ts2ocaml.js jsoo \
     -o node \
     --preset=full \
     --readable-names \
     --follow-relative-references \
     --rec-modules all \
     node_modules/@types/node/stream.d.ts

$ grep ' rec ' node/node__stream.mli
module rec Node_stream : sig

ts2ocaml 1.4.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions