From a003f602ae4b43662806347b2b321861f0089827 Mon Sep 17 00:00:00 2001 From: Sergey Slipchenko Date: Sat, 10 Feb 2024 11:51:39 +0400 Subject: [PATCH] fix: add extensions to module imports This should allow it to be used directly from Node.js, for example --- src/async.ts | 2 +- src/index.ts | 6 +++--- src/result.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/async.ts b/src/async.ts index 96dfc30..fb6ff3f 100644 --- a/src/async.ts +++ b/src/async.ts @@ -1,4 +1,4 @@ -import { Maybe } from './maybe'; +import { Maybe } from './maybe.js'; /** * An abstract box representing asynchronous value state. diff --git a/src/index.ts b/src/index.ts index f9fbf9c..fbad4d2 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,3 +1,3 @@ -export { Async } from './async'; -export { Maybe } from './maybe'; -export { Result } from './result'; +export { Async } from './async.js'; +export { Maybe } from './maybe.js'; +export { Result } from './result.js'; diff --git a/src/result.ts b/src/result.ts index 513370e..3c9503a 100644 --- a/src/result.ts +++ b/src/result.ts @@ -1,4 +1,4 @@ -import { Maybe } from './maybe'; +import { Maybe } from './maybe.js'; /** * An abstract box representing success or failure.