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
When using @genType with module aliases, the generated TypeScript definitions are not correctly referencing the aliased modules. This issue occurs when trying to access types and functions through the module alias.
Example:
Consider the following ReScript code:
// MyModule.res
@genType
type t = int
@genType
let add: (t, int) => int = (x, y) => x + y
// Wrapper.res
module MyModuleAlias = MyModule
// Usage.res
open Wrapper
let a = 5
@genType
let b = MyModuleAlias.add(a, 3)
Expected behavior:
The @genType annotations should generate the correct TypeScript type definitions and import paths, even when using module aliases.
Actual behavior:
The generated TypeScript definitions are not correctly referencing the aliased modules, causing issues when trying to use the aliased types and functions in a TypeScript/JavaScript context.