Skip to content

Commit

Permalink
Slightly more docs cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit0 committed Jun 21, 2024
1 parent 6e6b3b6 commit 2dde2e9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 16 deletions.
14 changes: 2 additions & 12 deletions internal-docs/components-and-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,17 @@ 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.
Each child gets a name; a component cannot have multiple 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`

Components are slowly being removed from TypeDoc.

## `Event`

`Event`s can be fired.

`Event` has methods:
`isPropagationStopped`
`isDefaultPrevented`
This component-decorator hierarchy is slowly being removed from TypeDoc.

## `@Option`

Expand Down
3 changes: 3 additions & 0 deletions internal-docs/internationalization.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ translation keys include numbers to indicate placeholders in the English string,
the translated strings should include `{n}` where the placeholder will be filled in at
runtime.

> Please do not submit machine generated translations for languages you are unfamiliar with.
> TypeDoc relies on contributors to ensure the accuracy of included translations.
## Validation

The `buildTranslation` and `buildIncompleteTranslation` functions will attempt to
Expand Down
4 changes: 0 additions & 4 deletions src/lib/utils/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,6 @@ export abstract class ChildableComponent<
return Object.values(this._componentChildren || {}) as C[];
}

hasComponent(name: string): boolean {
return !!(this._componentChildren || {})[name];
}

addComponent<T extends C>(
name: string,
componentClass: T | ComponentClass<T, O>,
Expand Down

0 comments on commit 2dde2e9

Please sign in to comment.