From 3a5db2116f2a0051ace94d389a5183be69805d27 Mon Sep 17 00:00:00 2001 From: Samuel Date: Sun, 10 Mar 2024 20:48:18 +0100 Subject: [PATCH] setup pure typescript exports --- src/functions/getConnectedAddresses.ts | 4 ++-- src/functions/index.ts | 1 + src/index.ts | 4 ++++ src/index.tsx | 20 -------------------- 4 files changed, 7 insertions(+), 22 deletions(-) create mode 100644 src/functions/index.ts create mode 100644 src/index.ts delete mode 100644 src/index.tsx diff --git a/src/functions/getConnectedAddresses.ts b/src/functions/getConnectedAddresses.ts index bba47d2..0ee9fbe 100644 --- a/src/functions/getConnectedAddresses.ts +++ b/src/functions/getConnectedAddresses.ts @@ -3,12 +3,12 @@ import { queryClient } from '../queryClient'; import { Provider, HubProvider, NeynarProvider } from '../providers'; import { ConnectedAddresses } from '../types'; -export default function getConnectedAddresses( +export const getConnectedAddresses = ( provider: Provider, fid: number, ethereum?: boolean, solana?: boolean -): ConnectedAddresses { +): ConnectedAddresses => { let addresses: ConnectedAddresses; if (provider instanceof HubProvider) { diff --git a/src/functions/index.ts b/src/functions/index.ts new file mode 100644 index 0000000..401a298 --- /dev/null +++ b/src/functions/index.ts @@ -0,0 +1 @@ +export { getConnectedAddresses } from "./getConnectedAddresses"; \ No newline at end of file diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..91d601a --- /dev/null +++ b/src/index.ts @@ -0,0 +1,4 @@ +import * as providers from './providers'; +import * as functions from './functions'; +export { providers, functions }; + diff --git a/src/index.tsx b/src/index.tsx deleted file mode 100644 index 8eeb375..0000000 --- a/src/index.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import React, { FC, HTMLAttributes, ReactChild } from 'react'; -import * as providers from './providers'; - -export const NeynarProvider = providers.NeynarProvider; - -export interface Props extends HTMLAttributes { - /** custom content, defaults to 'the snozzberries taste like snozzberries' */ - children?: ReactChild; -} - -// Please do not use types off of a default export module or else Storybook Docs will suffer. -// see: https://github.com/storybookjs/storybook/issues/9556 -/** - * A custom Thing component. Neat! - */ -export const Thing: FC = ({ children }) => { - return
{children || `the snozzberries taste like snozzberries`}
; -}; - -export { providers };