-
Notifications
You must be signed in to change notification settings - Fork 96
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
docs: clean up types and add API docs site #320
Conversation
typedoc
API documentation website
|
||
/** | ||
* @interface | ||
* @internal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@internal
is a typedoc-specific directive used to hide this type from the generated documentation interface.
This is applied to most types in this file since end users don't need to know the implementation details of how we generate SignOptions
and FlatOptions
.
/** | ||
* Options for codesigning a packaged `.app` bundle. | ||
*/ | ||
export interface SignOptions extends _SignOptions {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm in favor of exporting it as an interface if it means signAsync() will have correct params
Note that this PR doesn't actually set up any publishing for the website. I figured that could go into a follow-up PR where we set a GH Action similar to how electron/packager does it. |
/** | ||
* Options for codesigning a packaged `.app` bundle. | ||
*/ | ||
export interface SignOptions extends _SignOptions {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm in favor of exporting it as an interface if it means signAsync() will have correct params
🎉 This PR is included in version 1.3.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This PR adds
typedoc
API documentation from our TypeScript types for the@electron/osx-sign
package.The module already had some pretty good API documentation available on the README.md, so the PR mostly moves the existing explanations around. This has the added bonus of providing better editor intellisense.
Goals:
README.md
examples from focusing on the legacy CLI to focusing on the JS API.Notes:
typedoc
works a lot better with TypeScript interfaces rather than types. For example,Omit<A, B>
will not be expanded into its underlying properties and will show up as-is by default intypedoc
.@interface
directive was added to a few types, and the coreSignOptions
andFlatOptions
types were re-exported as interfaces that extends the underlying types.Preview from my fork of this repo: https://erickzhao.github.io/osx-sign/