From f2b434ed3174e191014552eae4afa867d22923c2 Mon Sep 17 00:00:00 2001 From: Jesse Andrews Date: Mon, 3 Feb 2025 14:14:40 -0500 Subject: [PATCH] only export types in node build --- typescript/packages/common-memory/interface.ts | 5 +++++ typescript/packages/common-memory/lib.ts | 4 ---- typescript/packages/common-memory/package.json | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/typescript/packages/common-memory/interface.ts b/typescript/packages/common-memory/interface.ts index 8d2e84c18..fc4d746c0 100644 --- a/typescript/packages/common-memory/interface.ts +++ b/typescript/packages/common-memory/interface.ts @@ -2,6 +2,11 @@ import type { Reference } from "merkle-reference"; export type { Reference }; +export type Command = { + watch?: In; + unwatch?: In; +}; + /** * Unique identifier for the store. */ diff --git a/typescript/packages/common-memory/lib.ts b/typescript/packages/common-memory/lib.ts index 2083d937a..cd02d23a9 100644 --- a/typescript/packages/common-memory/lib.ts +++ b/typescript/packages/common-memory/lib.ts @@ -37,10 +37,6 @@ interface MemoryServiceSession { router: Router.Router; } -export type Command = { - watch?: In; - unwatch?: In; -}; class Service implements MemoryService { constructor(public router: Router.Router) {} diff --git a/typescript/packages/common-memory/package.json b/typescript/packages/common-memory/package.json index fe21614e1..d26c60950 100644 --- a/typescript/packages/common-memory/package.json +++ b/typescript/packages/common-memory/package.json @@ -1,7 +1,8 @@ { "name": "@commontools/memory", + "type": "module", "exports": { - ".": "./lib.ts" + ".": "./interface.ts" }, "dependencies": { "merkle-reference": "^2.0.1"