[@genType.import "mongodb"]
[@genType.as "ObjectId"]
type t;
This generates
import {ObjectId as $$ObjectId_t} from 'mongodb';
Which works, and is correct, but in some cases can cause cyclical imports if only types are needed (this is a third party library so it wouldn't happen, but can happen with own library).
This syntax would be better as it's only compile-time and stripped at runtime.
import type {ObjectId as $$ObjectId_t} from 'mongodb';
Please excuse the old ReasonML syntax...
This generates
Which works, and is correct, but in some cases can cause cyclical imports if only types are needed (this is a third party library so it wouldn't happen, but can happen with own library).
This syntax would be better as it's only compile-time and stripped at runtime.