* An Application is a virtual tree extended with environment and plugin * information. In this form it is ready to mount to the browser DOM.
| 74 | * information. In this form it is ready to mount to the browser DOM. |
| 75 | */ |
| 76 | interface Application { |
| 77 | |
| 78 | /** |
| 79 | * Set environment data. |
| 80 | * Values set in the environment are available in components by |
| 81 | * registering a 'source' in their proptype declaration. |
| 82 | */ |
| 83 | set(name: string, value: any): void; |
| 84 | |
| 85 | /** |
| 86 | * Set rendering options. Options include: |
| 87 | * |
| 88 | * - validateProps: boolean |
| 89 | * Is propType validation enabled? There is a runtime penalty, so |
| 90 | * it may be useful to disable in production. |
| 91 | */ |
| 92 | option(name: string, value: any): void; |
| 93 | |
| 94 | /** Change the virtual element currently mounted */ |
| 95 | mount<P, S>(vnode: VirtualNode<P, S>): void; |
| 96 | |
| 97 | /** Use a plugin */ |
| 98 | use(fn: (app: Application) => any): void; |
| 99 | } |
| 100 | |
| 101 | |
| 102 |