book-maker-sdk
v1.0.8
Published
Book Maker SDK
Downloads
4
Readme
TypeDocs and BookMaker SDK
This repository is an example of using TypeDocs to document the codebase of an SDK. The following lists the sections of this document:
- Overview of TypeScript, JS SDKs and TypeDocs and documenting a TypeScript SDK
- Using TypeDocs
- Publishing the documentation
Overview of TypeScript, JS SDKs and TypeDocs and documenting a TypeScript SDK
TypeScript (TS) has replaced JavaScript as the preferred programming language. The Integrated Development Environment (IDE) like VSCode or JetBrains, translate the TS codebase to JavaScript as part of preparing files for the webserver. TS is a strictly typed language, making it easy for developers to use object-oriented design patterns. TypeScript in 5 minutes.
How JS SDKs are published and distributed
JS SDK developers bundle and publish their code as packages. Other developers access these published JS SDKs from NPM or a Content Delivery Network (CDN). Each method offers developers a different experience to developers.
Using NPM: The developer can install the package from NPM right into their IDE. This provides code assistance through hints. These hints are part of the documentation added to the codebase. Most developers code relying on the hints only.
Using CDN: The developer links to the JS SDK package on the CDN and relies completely on reference documentation.
TypeDocs
Link to TypeDocs site. If you have used JavaDocs or JSDocs, TypeDocs will be very familiar. In a nutsshell, the documentation is generated from the comments added just above classes, interfaces, functions and variables.
TypeDoc is a documentation generator for TypeScript, a tool which reads your TypeScript source files, parses comments contained within them, and generates a static site containing documentation for your code. TypeDocs
// $ npx typedoc src/index.ts
/** Documented! */
export function direct() {
return 1;
}
// Also documented.
export { indirect } from "./other";
// Not documented as it is not visible to your module's consumers.
function localHelper() {}