I am doing a project that compare TypeScript to ReScript here. One of the code need this type
@module("zustand") external create: ((set, get) => noteState) => (noteState => 'a) => 'a = "default"
The problem is I cannot use annotation in create
function and I wish to have identical working code with TypeScript project.
ReScript won’t let me do this. I can think the workaround now by using variant but I still want to find another way.
Edit: I wish to do this because it’s how Zustand is suppose to work.