ScalablyTyped/Converter

Dropping unexpected export in namespace TsExport

faveoled opened this issue · 1 comments

Trying to convert this project: https://www.npmjs.com/package/@tauri-apps/api?activeTab=code
Gives multiple similar warnings like the following:

[warn ] 2023-07-17T10:26:30.224126Z ReplaceExports.scala:55 Dropping unexpected export in namespace TsExport(NoComments,false,Named,Names(IArray((TsQIdent(IArray(TsIdentSimple(notification_Options))),Some(TsIdentSimple(Options))), (TsQIdent(IArray(TsIdentSimple(notification_Permission))),Some(TsIdentSimple(Permission))), (TsQIdent(IArray(TsIdentSimple(notification_sendNotification))),Some(TsIdentSimple(sendNotification))), (TsQIdent(IArray(TsIdentSimple(notification_requestPermission))),Some(TsIdentSimple(requestPermission))), (TsQIdent(IArray(TsIdentSimple(notification_isPermissionGranted))),Some(TsIdentSimple(isPermissionGranted)))),None)) [id => @tauri-apps/api, thread => 1, phase => typescript, scope => TreeScope(TsParsedFile() / TsDeclModule(@tauri-apps/api/notification-6cd45c32) / TsDeclNamespace(notification))]

I'm assuming it can't parse the content as follows:

export { O as Options, P as Permission, i as isPermissionGranted, r as requestPermission, s as sendNotification } from './notification-6cd45c32.js';

The result is I can't import properly named bindings. At the same time machine-generated bindings do not work properly.
ScalablyTyped Converter (version 1.0.0-beta42)

Thanks! I'm aware of this, but haven't gotten to it yet. Over time there typescript has grown a system for imports and exports inside namespaces, but I've never seen a spec for how it actually works.

It hasn't been all that much in use, which is why it hasn't been that urgent.

This is fairly high on my list of things to fix, but it'll be autumn before I have much time for this unfortunately