rescript-association / genType

Auto generation of idiomatic bindings between Reason and JavaScript: either vanilla or typed with TypeScript/FlowType.

Home Page:https://rescript-lang.org/docs/gentype/latest/introduction

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing shim for `Null.t`

sgrove opened this issue · comments

I suspect this is likely to show up quite a bit (and maybe there's a way to shim it in user land?), so just bringing it up.

While using pgtyped-rescript, I was experimenting with getting all the way into my typescript code from Rescript-generated code, but this is currently one of the show-stoppers:

(generated) block__sql.res:

/** 'InsertBlock' parameters type */
type insertBlockParams = {
  camel_case_name?: Null.t<string>,
  chain_id?: Null.t<string>,
  description?: Null.t<string>,
  id?: Null.t<string>,
  kind?: Null.t<string>,
  local_schema?: Null.t<string>,
  source_code?: Null.t<string>,
  title?: Null.t<string>,
}

block__sql.gen.tsx

src/sql/block__sql.gen.tsx:10:34 - error TS2307: Cannot find module './Null.gen.js' or its corresponding type declarations.

10 import type { t as Null_t } from "./Null.gen.js";