From b372fe7e2189241bca8a384a1a982f0a26805121 Mon Sep 17 00:00:00 2001 From: Kris Zyp Date: Sat, 13 Aug 2022 17:20:43 -0600 Subject: [PATCH] Use ESM-friendly imports and file extensions for TS, #75 --- index.d.ts => index.d.mts | 6 +++--- pack.d.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) rename index.d.ts => index.d.mts (82%) diff --git a/index.d.ts b/index.d.mts similarity index 82% rename from index.d.ts rename to index.d.mts index b7be7b9..3323dbf 100644 --- a/index.d.ts +++ b/index.d.mts @@ -9,9 +9,9 @@ export { clearSource, roundFloat32, isNativeAccelerationEnabled, -} from './unpack' -import { Options } from './unpack' -export { Packr, Encoder, pack, encode } from './pack' +} from './unpack.js' +import { Options } from './unpack.js' +export { Packr, Encoder, pack, encode } from './pack.js' import { Transform, Readable } from 'stream' export as namespace msgpackr; diff --git a/pack.d.ts b/pack.d.ts index e1e1bd5..699384c 100644 --- a/pack.d.ts +++ b/pack.d.ts @@ -1,5 +1,5 @@ -import { Unpackr } from './unpack' -export { addExtension, FLOAT32_OPTIONS } from './unpack' +import { Unpackr } from './unpack.js' +export { addExtension, FLOAT32_OPTIONS } from './unpack.js' export class Packr extends Unpackr { pack(value: any): Buffer encode(value: any): Buffer