Skip to content

GenType does not handle JSON types in Core properly #7157

Closed
@jmagaram

Description

@jmagaram

Sample project:

https://github.com/jmagaram/functors

Look at file Simple.res with the code:

@genType
let hello = JSON.Encode.string("hello")

The TypeScript is...

import * as SimpleJS from './Simple.res.mjs';
import type {t as Core__JSON_t} from '@rescript/core/src/Core__JSON.gen';
export const hello: Core__JSON_t = SimpleJS.hello as any;

And the error on the second line is...

Cannot find module '@rescript/core/src/Core__JSON.gen' or its corresponding type declarations.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions