Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor README #5

Merged
merged 18 commits into from
Sep 4, 2024
Merged

Conversation

ignaciopenia
Copy link
Contributor

This PR includes minor fixes to the readme.
Also modified typedoc in package.json.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
@tenuki tenuki requested a review from bolasblack September 4, 2024 21:01
@tenuki
Copy link
Contributor

tenuki commented Sep 4, 2024

@bolasblack reviewed and merged changes you sent to our repo.

image

We still have some basic concerns: the generated docs format displays some non-existing or not-accessible objects on the left column (lib hierarchy sections).

  1. there exists a library component supposed to be accessible called bitcoinHelpers which, in my opinion doesn't appears to be available. (see below capture 1 trying to access from ts-node and capture 2 for access from node).
  2. On the same left-column there appears the index element which in practice is hidden from user.
  3. What we understand that is available for the user is what hangs below that index element.

Seen that, I think we should try to remove definitions in entrypoint and try to go with typedoc src/index.ts..

If you want merge this one and we then can change the typedoc issue tomorrow.

capture 1
> import{ bitcoinHelpers } from '@xlink-network/xlink-sdk';
<repl>.ts:4:9 - error TS2305: Module '"@xlink-network/xlink-sdk"' has no exported member 'bitcoinHelpers'.

4 import{ bitcoinHelpers } from '@xlink-network/xlink-sdk';
          ~~~~~~~~~~~~~~
capture 2
$ node
Welcome to Node.js v20.8.0.
Type ".help" for more information.
> mod = require( "@xlink-network/xlink-sdk")
{
  EVMContractType: [Getter],
  InvalidMethodParametersError: [Getter],
  KnownChainId: [Getter],
  KnownTokenId: [Getter],
  UnsupportedBridgeRouteError: [Getter],
  UnsupportedChainError: [Getter],
  UnsupportedContractAssignedChainIdError: [Getter],
  XLinkSDK: [Getter],
  XLinkSDKErrorBase: [Getter],
  toSDKNumberOrUndefined: [Getter]
}
> mod.
mod.__proto__                                mod.constructor                              mod.hasOwnProperty
mod.isPrototypeOf                            mod.propertyIsEnumerable                     mod.toLocaleString
mod.toString                                 mod.valueOf

mod.EVMContractType                          mod.InvalidMethodParametersError             mod.KnownChainId
mod.KnownTokenId                             mod.UnsupportedBridgeRouteError              mod.UnsupportedChainError
mod.UnsupportedContractAssignedChainIdError  mod.XLinkSDK                                 mod.XLinkSDKErrorBase
mod.__esModule                               mod.toSDKNumberOrUndefined

@bolasblack
Copy link
Collaborator

  1. there exists a library component supposed to be accessible called bitcoinHelpers which, in my opinion doesn't appears to be available. (see below capture 1 trying to access from ts-node and capture 2 for access from node).

Hi @tenuki , that's a good question, if you can install this package in any other project, you can try like this:

image

if users are using the legacy version of nodejs, they can write require('@xlink-network/xlink-sdk/lib/bitcoinHelpers')

On the same left-column there appears the index element which in practice is hidden from user.

Yes, but I have no better idea how to deal with it, if we need to export multiple endpoints in the future. And I guess users would understand it (since nodejs will respect index.js as the default entrypoint of a module)

@bolasblack bolasblack merged commit 006e6fb into xlink-network:master Sep 4, 2024
1 check passed
bolasblack pushed a commit that referenced this pull request Sep 4, 2024
* add typedoc comments

* fix merge error

* update dev-dependencies to include typedoc

* update package json

* add errors to typedoc

* add use cases and missing function to typedoc

* README refactor and link to typedoc for documentation

* refactor README

* fix link to typedoc

* typedoc config was modified

* fixed imports

* fix link and some formating

---------

Co-authored-by: david weil <david.weil@endlesstruction.com.ar>
Co-authored-by: david weil <tenuki@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants