-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Problem
ContainerDbType (the branded type returned by containerField()) is not exported from @proofkit/fmodata's main entry point. It is only exported from the internal barrel orm/index.d.ts, which is not accessible via the package's exports map.
This means any consumer that uses containerField() in a file with declaration emit enabled (declaration: true in tsconfig) will hit TS2742:
The inferred type of 'MyTable' cannot be named without a reference to
'../node_modules/@proofkit/fmodata/dist/esm/orm'. This is likely not portable.
A type annotation is necessary.
Expected behavior
ContainerDbType should be exported from @proofkit/fmodata alongside containerField:
export { containerField, type ContainerDbType } from "./orm";Reproduction
import { fmTableOccurrence, containerField, textField } from "@proofkit/fmodata";
// This triggers TS2742 when declaration emit is enabled
export const MyTable = fmTableOccurrence("MyTable", {
id: textField(),
file: containerField(),
}, { entityId: "FMTID:123" });Workaround
Disable declaration emit ("noEmit": true) if consuming the package source directly via transpilePackages.
Versions
@proofkit/fmodata: 0.1.0-beta.34 (also present in beta.35)- TypeScript: 5.8.3
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels