1 | import { InternalComponentCapabilities, InternalComponentManager } from '@glimmer/interfaces';
|
2 | import { Reference } from '@glimmer/reference';
|
3 | export declare class TemplateOnlyComponentManager implements InternalComponentManager {
|
4 | getCapabilities(): InternalComponentCapabilities;
|
5 | getDebugName({ name }: TemplateOnlyComponentDefinition): string;
|
6 | getSelf(): Reference;
|
7 | getDestroyable(): null;
|
8 | }
|
9 | export declare const TEMPLATE_ONLY_COMPONENT_MANAGER: TemplateOnlyComponentManager;
|
10 | export declare class TemplateOnlyComponentDefinition {
|
11 | moduleName: string;
|
12 | name: string;
|
13 | constructor(moduleName?: string, name?: string);
|
14 | toString(): string;
|
15 | }
|
16 | /**
|
17 | This utility function is used to declare a given component has no backing class. When the rendering engine detects this it
|
18 | is able to perform a number of optimizations. Templates that are associated with `templateOnly()` will be rendered _as is_
|
19 | without adding a wrapping `<div>` (or any of the other element customization behaviors of [@ember/component](/ember/release/classes/Component)).
|
20 | Specifically, this means that the template will be rendered as "outer HTML".
|
21 |
|
22 | In general, this method will be used by build time tooling and would not be directly written in an application. However,
|
23 | at times it may be useful to use directly to leverage the "outer HTML" semantics mentioned above. For example, if an addon would like
|
24 | to use these semantics for its templates but cannot be certain it will only be consumed by applications that have enabled the
|
25 | `template-only-glimmer-components` optional feature.
|
26 |
|
27 | @example
|
28 |
|
29 | ```js
|
30 | import { templateOnlyComponent } from '@glimmer/runtime';
|
31 |
|
32 | export default templateOnlyComponent();
|
33 | ```
|
34 |
|
35 | @public
|
36 | @method templateOnly
|
37 | @param {String} moduleName the module name that the template only component represents, this will be used for debugging purposes
|
38 | @category EMBER_GLIMMER_SET_COMPONENT_TEMPLATE
|
39 | */
|
40 | export declare function templateOnlyComponent(moduleName?: string, name?: string): TemplateOnlyComponentDefinition;
|
41 | //# sourceMappingURL=template-only.d.ts.map |
\ | No newline at end of file |