Skip to content

Conversation

@kamranayub
Copy link
Contributor

@kamranayub kamranayub commented Jun 10, 2016

Fixes #222

The Problem

Options only get added by Components when addComponent is called. For DefaultTheme, it was only being added in the Renderer inside prepareTheme. However, when you tried to set a theme option (e.g. gaID), the option declaration has not been added yet to the Options bag. When Application.bootstrap is called, which in turn calls Options.setValue, the declarations don't exist yet so Typedoc fails.

The Fix

Move DefaultTheme options to Renderer because Renderer is added immediately in the Application constructor.

There may be a cleaner way to fix this without moving the options if we can initialize the theme before app bootstrap is called or if the decorator just registered options itself (the main issue there is that the order of the Component and Options decorator execution is in a way such that _componentName is not set before the Options decorator factory runs, so it's undefined). You might be able to use the reflection helpers to find the parent Component (class context) of the Options property decorator.

…ily and options don't exist on Application bootstrap
@blakeembrey blakeembrey merged commit 5c8a666 into TypeStrong:master Jun 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--hideGenerator, --gaSite, --gaID, --entryPoint do not work in 0.4.1

2 participants