diff --git a/index.d.ts b/index.d.ts index d9917f1..530e290 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,10 +1,10 @@ export * from "./build/types/AudioCodecs"; -export type { default as AudioDecoder } from "./build/types/AudioDecoder"; -export type { default as AudioEncoder } from "./build/types/AudioEncoder"; +export type AudioDecoder = import("./build/types/AudioDecoder"); +export type AudioEncoder = import("./build/types/AudioEncoder"); +export type AudioEncoderIncomingStreamTrack = import("./build/types/AudioEncoderIncomingStreamTrack"); export type { - default as IncomingStreamTrackBridge, ActiveEncodingInfo, ActiveLayersInfo, EncodingStats, LayerStats, MediaStats, PacketWaitTime, TrackStats, } from "./build/types/AudioEncoderIncomingStreamTrack"; diff --git a/lib/Native.d.ts b/lib/Native.ts similarity index 100% rename from lib/Native.d.ts rename to lib/Native.ts diff --git a/package.json b/package.json index 46c0f95..cfd310d 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "Audio codecs for Media and RTMP servers", "main": "index.js", "scripts": { - "prepare": "tsc --checkJs false", + "prepare": "tsc --checkJs false && mkdir -p build/src && cp src/*.d.ts build/src", "check": "tsc --noEmit --emitDeclarationOnly false", "configure": "node-gyp configure", "swig": "swig -javascript -node -c++ src/audio-codecs.i",