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

third-party extension support for typedoc plugin #18007

Merged
merged 6 commits into from Jan 10, 2023

Conversation

boneskull
Copy link
Contributor

WIP PR which makes changes needed for @appium/typedoc-plugin-appium to work with "third party" extensions (in other words: extensions not in this monorepo).

Summary

E2E tests are quasi-blocking on merge & release of TypeStrong/typedoc#2130; it is a huge pain to test without this.

  • Adds some options to control output
  • Rename CommandsReflection to ExtensionReflection due to poor granular control over the display name
  • Rename the custom "kinds"; add kinds for drivers and plugins (which affects display titles)
  • Remove namespace from "kinds" for same reason
  • Refactors, reformatting
  • Rename entry point from plugin.ts to index.ts
  • Update keywords in package.json for auto-discovery
  • Remove cruft from root typedoc.json
  • Update README.md

@boneskull
Copy link
Contributor Author

boneskull commented Jan 4, 2023

@boneskull boneskull self-assigned this Jan 4, 2023
@boneskull boneskull added Enhancement feature Documentation related to writing, reading, or generating documentation labels Jan 4, 2023
Copy link
Member

@jlipps jlipps left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems reasonable to me!

E2E tests are quasi-blocking on merge & release of TypeStrong/typedoc#2130; it is a huge pain to test without this.

- Adds some options to control output
- Rename `CommandsReflection` to `ExtensionReflection` due to poor granular control over the display name
- Rename the custom "kinds"; add kinds for drivers and plugins (which affects display titles)
- Remove namespace from "kinds" for same reason
- Refactors, reformatting
- Rename entry point from `plugin.ts` to `index.ts`
- Update keywords in `package.json` for auto-discovery
- Remove cruft from root `typedoc.json`
- Update `README.md`
- Update peer dependencies; the other plugins must be peer deps or typedoc will be unable to auto-discover them
@boneskull boneskull changed the base branch from boneskull/consume-tsconfig-pkg to master January 5, 2023 20:28
…async methods

Instead of only inspecting `ReflectionKind.Method`, we now examine `ReflectionKind.Property`, which can be of type `ReflectionType` pointing to an async function.  Example:

```js
async function baz() {}

class Foo {
  async bar() {} // ReflectionKind.Method
  baz = baz; // ReflectionKind.Property referencing a function
}
```

Also ensures `static` methods aren't picked up; this could happen if a static method shares the same name with a known command method as defined in the builtin routes.
@boneskull boneskull marked this pull request as ready for review January 9, 2023 22:15
@boneskull
Copy link
Contributor Author

will merge once CI passes

- `BuiltinMethodMapConverter`'s `convert()` will _always_ return a `BuiltinCommands` / removed unused import
- Verbose logging for skipped methods
- Remove useless type aliases from option declarations and add some no-op typechecks (these will be compiled away)
- Add some docstrings to guards and types
- `CallSignatureReflectionWithParams` is now `CallSignatureReflectionWithArity`, and it is specific about having a nonzero arity. Broke out `CallSignatureReflection` from this, since the guard and type didn't fully match up
@boneskull boneskull merged commit df31cdd into master Jan 10, 2023
@boneskull boneskull deleted the boneskull/cmd-docs-3p branch February 28, 2023 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation related to writing, reading, or generating documentation Enhancement feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants