From 36b0ed4c95ebe11a31dead7f776c93bec250a644 Mon Sep 17 00:00:00 2001
From: muqiuhan Allow maximum number of domains to be specified as a OCAMLRUNPARAM parameter #13272 A new abstract data type of enumerations in Set.Make(Ord).Enum #13195 Emphasize that Bigarray.int refers to the OCaml int type, and not the C int type #12298 [ANN] A small extension of Bigarray.Genarray adding iteration, mapping and folding Combinations of Reusable Abstract Domains for a Multilingual Static Analyzer Exploring the Docusaurus+Odoc comboType system and polymorphic let’sExploring the Docusaurus+Odoc combo Gitlab - MOPSA/MOPSA analyzer: stands for Modular and Open Platform for Static Analysis. GitHub - mbarbin/bopkit: An educational project for digital circuits programming GitHub - dx3mod/rpmfile: A library for reading metadata from RPM packages. Github - gildor478/ocaml-fileutils: OCaml API to manipulate real files (POSIX like) and filenames Github - NathanReb/ocaml-api-watch: Libraries and tools to keep watch on you OCaml lib’s API changes
+
+ ^o3
~/\_/\_|)
|/=_=\|
" "语言的发展
+
+新消息
+
+有价值的文章
+
+有趣的项目
+
]]>@genType 被合并进编译器,无需任何依赖就能使用,当在 Rescript 中 @genType 了使用某些 Rescript built-in 的基本类型时,可能会生成有问题的 import 相关代码,例如:
@genType |
status 函数具有 Js.Json.t => option<Js.Json.t> 类型,那么在生成的 TypeScript 文件中,会出现这样的 import:
import type { Json_t as Js_Json_t } from "./Js.gen.tsx" |
而 Js.gen.tsx 这个文件是不存在的,解决方案是使用 @genType 的 shim:
在 rescript.json 中的 gentypeconfig 中添加 shim 配置:
... |
然后新建 Js.shim.ts:
export type Json_t = unknown; |
删除原来由 @genType 生成的 TypeScript 文件并重新生成
现在生成的 TypeScript 文件将会从 Js.shim.ts import 类型:
import type {Json_t as Js_Json_t} from '../../src/model/Js.shim.ts'; |
@genType 被合并进编译器,无需任何依赖就能使用,当在 Rescript 中 @genType 了使用某些 Rescript built-in 的基本类型时,可能会生成有问题的 import 相关代码,例如:
+@genType |
status 函数具有 Js.Json.t => option<Js.Json.t> 类型,那么在生成的 TypeScript 文件中,会出现这样的 import:
import type { Json_t as Js_Json_t } from "./Js.gen.tsx" |
而 Js.gen.tsx 这个文件是不存在的,解决方案是使用 @genType 的 shim:
在 rescript.json 中的 gentypeconfig 中添加 shim 配置:
... |
然后新建 Js.shim.ts:
export type Json_t = unknown; |
删除原来由 @genType 生成的 TypeScript 文件并重新生成
现在生成的 TypeScript 文件将会从 Js.shim.ts import 类型:
import type {Json_t as Js_Json_t} from '../../src/model/Js.shim.ts'; |