However, CompatibleProvider from src/providers.ts is not currently exported as a module.
Proposed Change:
To address this, I propose exposing providers from the src/whatsabi.ts file by adding the following modification:
import * as loaders from "./loaders.js";
import * as proxies from "./proxies.js";
+ import * as providers from "./providers.js";
export { loaders };
export { proxies };
+ export { providers };
This change would allow access to CompatibleProvider and other utilities within providers.js.
Let me know if you'd like any further adjustments to this draft! If it is acceptable, I will be happy to open a pull request implementing the above change.
To implement functionality similar to
auto.ts
, it's necessary to invokeProxyResolver.resolve
and retrieve the implementation address.Currently, the
ProxyResolver
interface is defined as follows:https://github.com/shazow/whatsabi/blob/9d12cf97329ac99c063378a60ad7438cdf78ef52/src/proxies.ts#L47-L51
To work with the
resolve
function, we need to convert the provider to aCompatibleProvider
type, as demonstrated inauto.ts
: https://github.com/shazow/whatsabi/blob/9d12cf97329ac99c063378a60ad7438cdf78ef52/src/auto.ts#L119However,
CompatibleProvider
fromsrc/providers.ts
is not currently exported as a module.Proposed Change:
To address this, I propose exposing providers from the
src/whatsabi.ts
file by adding the following modification:This change would allow access to
CompatibleProvider
and other utilities withinproviders.js
.Let me know if you'd like any further adjustments to this draft! If it is acceptable, I will be happy to open a pull request implementing the above change.