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

generate api docs with typedoc #102

Merged
merged 5 commits into from
Apr 16, 2024
Merged

generate api docs with typedoc #102

merged 5 commits into from
Apr 16, 2024

Conversation

dckc
Copy link
Member

@dckc dckc commented Apr 3, 2024

refs:

Description / Documentation Considerations

Generate api-doc using typedoc.

Security Considerations

adds typedoc to devDependencies

Scaling Considerations

n/a

Testing Considerations

It would be nice if we had examples that get tested. But I suppose we're not there yet.

@dckc
Copy link
Member Author

dckc commented Apr 3, 2024

react-components fails to build

error TS7016: Could not find a declaration file for module '@agoric/web-components'
~/projects/ui-kit
17:29 connolly@bldbox$ yarn docs
yarn run v1.22.19
$ typedoc --excludeInternal
[debug] Reading tsconfig at ./tsconfig.json
[debug] Using TypeScript 5.1.6 from ./node_modules/typescript/lib
[debug] Expanded ./packages/* to:
        ./packages/react-components/package.json
        ./packages/rpc/package.json
        ./packages/web-components/package.json
[debug] Reading project at ./packages/react-components
[debug] Reading tsconfig at ./packages/react-components/tsconfig.json
[debug] Reading project at ./packages/rpc
[debug] Reading tsconfig at ./packages/rpc/tsconfig.json
[debug] Reading project at ./packages/web-components
[debug] Reading tsconfig at ./packages/web-components/tsconfig.json
[info] Converting project at ./packages/react-components
[debug] Using TypeScript 5.1.6 from ./node_modules/typescript/lib
[debug] Expanded ./packages/react-components/src/lib/index.ts to:
        ./packages/react-components/src/lib/index.ts
[debug] Converting with 1 programs 1 entry points
packages/react-components/src/lib/context/AgoricContext.ts:5:8 - error TS7016: Could not find a declaration file for module '@agoric/web-components'. '/home/connolly/projects/ui-kit/packages/web-components/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/agoric__web-components` if it exists or add a new declaration (.d.ts) file containing `declare module '@agoric/web-components';`

5 } from '@agoric/web-components';
         ~~~~~~~~~~~~~~~~~~~~~~~~

packages/react-components/src/lib/context/AgoricProviderLite.tsx:14:8 - error TS7016: Could not find a declaration file for module '@agoric/web-components'. '/home/connolly/projects/ui-kit/packages/web-components/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/agoric__web-components` if it exists or add a new declaration (.d.ts) file containing `declare module '@agoric/web-components';`

14 } from '@agoric/web-components';
          ~~~~~~~~~~~~~~~~~~~~~~~~

packages/react-components/src/lib/hooks/amountInput.ts:3:46 - error TS7016: Could not find a declaration file for module '@agoric/web-components'. '/home/connolly/projects/ui-kit/packages/web-components/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/agoric__web-components` if it exists or add a new declaration (.d.ts) file containing `declare module '@agoric/web-components';`

3 import { parseAsValue, stringifyValue } from '@agoric/web-components';
                                               ~~~~~~~~~~~~~~~~~~~~~~~~

[info] Converting project at ./packages/rpc
[debug] Using TypeScript 5.1.6 from ./node_modules/typescript/lib
[debug] Expanded ./packages/rpc/index.ts to:
        ./packages/rpc/index.ts
[debug] Converting with 1 programs 1 entry points
[debug] Finished getting entry points in 606ms
[debug] Begin readme.md/package.json search at ./packages/rpc
[debug] Finished conversion in 34ms
[debug] Validation took 0ms
[info] Converting project at ./packages/web-components
[debug] Using TypeScript 5.1.6 from ./node_modules/typescript/lib
[debug] Expanded ./packages/web-components/index.js to:
        ./packages/web-components/index.js
[debug] Converting with 1 programs 1 entry points
[debug] Finished getting entry points in 1352ms
[debug] Begin readme.md/package.json search at ./packages/web-components
[debug] Finished conversion in 14ms
[debug] The type CopySet has no declarations, implicitly allowing missing export.
[debug] The type CopyBag has no declarations, implicitly allowing missing export.
[warning] ClientConfig, defined in ./packages/web-components/src/wallet-connection/walletConnection.js, is referenced by makeAgoricWalletConnection.makeAgoricWalletConnection.clientConfig but not included in the documentation.
[warning] Ratio, defined in ./packages/web-components/src/display/natValue/ratio.js, is referenced by stringifyRatio.stringifyRatio.ratio but not included in the documentation.
[warning] Brand, defined in ./packages/web-components/src/display/natValue/stringifyRatio.js, is referenced by stringifyRatio.stringifyRatio.getDecimalPlaces.__type.__type.brand but not included in the documentation.
[warning] Brand, defined in ./packages/web-components/src/display/natValue/stringifyRatioAsFraction.js, is referenced by stringifyRatioAsFraction.stringifyRatioAsFraction.getDecimalPlaces.__type.__type.brand but not included in the documentation.
[warning] Brand, defined in ./packages/web-components/src/display/natValue/stringifyRatioAsPercent.js, is referenced by stringifyRatioAsPercent.stringifyRatioAsPercent.getDecimalPlaces.__type.__type.brand but not included in the documentation.
[debug] Validation took 1ms
[info] Merging converted projects
[error] Failed to convert one or more packages, result will not be merged together.
[debug] Full run took 4715ms
error Command failed with exit code 3.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@dckc dckc force-pushed the dc-typedoc branch 2 times, most recently from 8c02f27 to 02a1155 Compare April 12, 2024 22:12
@dckc dckc marked this pull request as ready for review April 12, 2024 22:43
@dckc dckc requested a review from toliaqat April 12, 2024 22:45
@dckc
Copy link
Member Author

dckc commented Apr 12, 2024

@toliaqat does this look like it will support continuous publishing like https://agoric-sdk.pages.dev/ ?

-- Agoric/documentation#1047

typedoc.json Outdated Show resolved Hide resolved
@dckc
Copy link
Member Author

dckc commented Apr 16, 2024

Thanks, @turadg . it builds nicely now:

image

@dckc dckc changed the title generate api docs with typedoc (WIP) generate api docs with typedoc Apr 16, 2024
@dckc dckc enabled auto-merge (rebase) April 16, 2024 18:05
@dckc dckc merged commit cc3b05c into main Apr 16, 2024
1 check passed
@dckc dckc deleted the dc-typedoc branch April 16, 2024 18:08
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.

2 participants