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

PLT-9008- Fix generated docs warnings #139

Merged
merged 7 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/test-suite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,10 @@ jobs:
- name: 🧪 Run tests
run: |
nix develop --show-trace --command bash -c "npm test"

- name: 🏥 Check docs generation
run: |
nix develop --show-trace --command bash -c "npm run docs"
- name: 📝 Check formatting
run: |
nix develop --show-trace --command bash -c "treefmt --fail-on-change"
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### General

- PLT-9008: Fix documentation warnings and add a CI check to avoid them in the future. (Implemented in [PR-139](https://github.com/input-output-hk/marlowe-ts-sdk/pull/139))
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"build": "tsc --version && tsc --build && shx mkdir -p dist && rollup --config rollup/config.mjs",
"clean": "npm run clean --workspaces && shx rm -rf dist",
"test": "NODE_OPTIONS='--experimental-vm-modules --no-warnings' jest",
"docs": "typedoc .",
"docs": "typedoc . --treatWarningsAsErrors",
"serve": "ws --port 1337 --rewrite '/importmap -> https://cdn.jsdelivr.net/gh/input-output-hk/[email protected]/jsdelivr-npm-importmap.js'",
"serve-dev": "ws --port 1337 --rewrite '/importmap -> /dist/local-importmap.js'"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/language/core/v1/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
const tenADA: Value = { multiply: 10n, times: oneADA };

// Note that the explicit `: Value` type annotation is not strictly needed, the following line would
// also work both in TypeScript and JavaScript
// also work both in TypeScript and JavaScript
// const tenADA = { multiply: 10n, times: oneADA};

// The only difference is when we make a mistake. When we add the explicit annotation we inmediatly
Expand Down
2 changes: 1 addition & 1 deletion packages/language/examples/src/atomicSwap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ import {
} from "@marlowe.io/language-core-v1";
import * as G from "@marlowe.io/language-core-v1/guards";

type IReduce = void;
export type IReduce = void;
const iReduce: void = undefined;

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/language/examples/src/playground-v1/escrow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ import {
Contract,
} from "@marlowe.io/language-core-v1/playground-v1";

interface EscrowParams {
export interface EscrowParams {
price: number;
depositTimeout: Timeout;
disputeTimeout: Timeout;
Expand Down
4 changes: 3 additions & 1 deletion packages/language/examples/typedoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"./src/index.ts",
"./src/vesting.ts",
"./src/atomicSwap.ts",
"./src/survey.ts"
"./src/survey.ts",
"./src/playground-v1/escrow.ts",
"./src/playground-v1/escrow-with-collateral.ts",
],
"tsconfig": "./src/tsconfig.json",
"categorizeByGroup": false
Expand Down
19 changes: 15 additions & 4 deletions packages/runtime/client/rest/src/contract/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
* ```ts
* import * as C from "@marlowe.io/runtime-rest-client/contract";
*```
* This package contains all the implementation and details related to
* endpoints under the URI `/contracts/...` :
* - {@link index.RestClient#buildCreateContractTx | Build Create Contract Tx }
* This package contains all the implementation and details related to
* endpoints under the URI `/contracts/...` :
* - {@link index.RestClient#buildCreateContractTx | Build Create Contract Tx }
* - {@link index.RestClient#getContracts | Get contracts }
* - {@link index.RestClient#getContractById | Get Contract By Id }

Expand All @@ -28,6 +28,7 @@ export {
Recipient,
TokenQuantity,
RoleTokenConfiguration,
RoleTokenConfigurations,
RolesConfiguration,
} from "./rolesConfigurations.js";
export {
Expand All @@ -45,8 +46,18 @@ export { TxHeader } from "./transaction/header.js";
export {
TransactionsRange,
GetTransactionsForContractResponse,
ApplyInputsToContractRequest,
} from "./transaction/endpoints/collection.js";
export {
CreateContractSourcesResponse,
GetContractSourceAdjacencyResponse,
GetContractSourceClosureResponse,
GetContractSourceAdjacencyRequest,
GetContractBySourceIdRequest,
GetContractSourceClosureRequest,

} from "./endpoints/sources.js";
export { TransactionDetails } from "./transaction/details.js";

export { TxStatus } from "./transaction/status.js";
export {GetNextStepsForContractRequest} from "./next/endpoint.js"
export { TransactionTextEnvelope } from "./transaction/endpoints/collection.js";
2 changes: 2 additions & 0 deletions packages/runtime/client/rest/src/payout/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
export * from "./details.js";
export * from "./header.js";
export * from "./status.js";
export * from "./endpoints/collection.js";
export * from "./endpoints/singleton.js";
2 changes: 2 additions & 0 deletions packages/runtime/client/rest/src/withdrawal/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
export * from "./header.js";
export * from "./details.js";
export * from "./endpoints/collection.js";
export * from "./endpoints/singleton.js";
Loading