From d863c373ef1cfff18cd2b4e9864057fea107115e Mon Sep 17 00:00:00 2001 From: Liran Cohen Date: Thu, 2 May 2024 14:10:05 -0400 Subject: [PATCH] add reference types from dwn-sdk-js to avoid pnpm build error (#507) * add reference types from dwn-sdk-js to avoid pnpm build error https://github.com/microsoft/TypeScript/issues/47663\#issuecomment-1962129199 * add changesets * add comment and link to PR explaining why the refence type is there --- .changeset/beige-tools-yawn.md | 7 +++++++ packages/api/src/protocol.ts | 6 ++++++ packages/api/src/record.ts | 6 ++++++ 3 files changed, 19 insertions(+) create mode 100644 .changeset/beige-tools-yawn.md diff --git a/.changeset/beige-tools-yawn.md b/.changeset/beige-tools-yawn.md new file mode 100644 index 000000000..f0e0bb362 --- /dev/null +++ b/.changeset/beige-tools-yawn.md @@ -0,0 +1,7 @@ +--- +"@web5/api": patch +--- + +add reference types from dwn-sdk-js to avoid pnpm build error + +https://github.com/microsoft/TypeScript/issues/47663#issuecomment-1962129199 diff --git a/packages/api/src/protocol.ts b/packages/api/src/protocol.ts index 98985fdd3..63ba4a866 100644 --- a/packages/api/src/protocol.ts +++ b/packages/api/src/protocol.ts @@ -1,3 +1,9 @@ +/** + * NOTE: Added reference types here to avoid a `pnpm` bug during build. + * https://github.com/TBD54566975/web5-js/pull/507 + */ +/// + import type { DwnMessage, DwnResponseStatus, Web5Agent } from '@web5/agent'; import { DwnInterface } from '@web5/agent'; diff --git a/packages/api/src/record.ts b/packages/api/src/record.ts index 70342f93e..e3a1ff256 100644 --- a/packages/api/src/record.ts +++ b/packages/api/src/record.ts @@ -1,3 +1,9 @@ +/** + * NOTE: Added reference types here to avoid a `pnpm` bug during build. + * https://github.com/TBD54566975/web5-js/pull/507 + */ +/// + import type { Readable } from '@web5/common'; import type { Web5Agent,