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

Convert default themes to JSX; merge into typedoc repo #1634

Closed
wants to merge 33 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
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
3 changes: 3 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
"examples",
"dist",
"coverage",
"src/lib/output/themes/webpack.*.js",
"src/lib/output/themes/default/assets",
"src/lib/output/themes/minimal/assets",
// Would be nice to lint these, but they shouldn't be included in the project,
// so we need a second eslint config file.
"src/test/converter",
Expand Down
9 changes: 8 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
{
"typescript.tsdk": "./node_modules/typescript/lib"
"typescript.tsdk": "./node_modules/typescript/lib",
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"prettier.enable": true
}
31 changes: 31 additions & 0 deletions internal-docs/components-and-events.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Components and Events

TypeDoc uses a `Component` and `Event`-based architecture.

## `Component`

`Component`s can have child `Component`s.
Each child gets a name; a component cannot have 2x children with the same name.

`Component` has methods / fields:
`componentName` set by decorator metadata
`addComponent(name, ComponentClass)` responsible for instantiating the component
`trigger()`
`bubble()` like trigger, but after trigger also calls on parent component.

`Component` subclasses are annotated with a decorator.
if not marked `internal` and if is a subclass of another component's childClass,
then becomes registered as a `_defaultComponent`

## `Event`

`Event`s can be fired.

`Event` has methods:
`isPropagationStopped`
`isDefaultPrevented`

## `@BindOption`

`@BindOption` decorator can be placed on any class which has `application` or `options` fields.
It turns the field into a getter which gets the value from `this.options` or `this.application.options`
Loading